Highcharts组合图:列覆盖线系列标记

时间:2013-09-13 00:14:17

标签: javascript jquery highcharts highstock

我正在使用Highstocks,我在图表中有列和行。唯一的问题是,列似乎掩盖了我使用highstock而不是highchart的行标记。这是我的高级小提琴

http://jsfiddle.net/6JACr/1/

这里有一个示例高图小提琴,其中列系列没有覆盖行标记。

http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/combo/

这段代码可能不相关,但我需要添加它,否则stackoverflow不会让我发布。

这是我的高档系列

accu_series = {
        name: "ACCU",
        data: accu_data,
        yAxis: 1
};
all_series[0] = accu_series;
nu_series = {
        name: "NU",
        type: "column",
        data: nu_data,
        stack: 0
};
all_series[1] = nu_series;
dau_series = {
        name: "DAU",
        type: "column",
        data: dau_data,
        stack: 0
};
all_series[2] = dau_series;

1 个答案:

答案 0 :(得分:1)

JSFiddle

只需更改图表的顺序即可。我认为这就决定了什么是最重要的。

function fill_series() {
    nu_series = {
        name: "NU",
        type: "column",
        data: nu_data,
        stack: 0
    };
    all_series[0] = nu_series;
    dau_series = {
        name: "DAU",
        type: "column",
        data: dau_data,
        stack: 0
    };
    all_series[1] = dau_series;        
    accu_series = {
        name: "ACCU",
        type: 'spline',
        data: accu_data,
        yAxis: 1,
        marker: {
            lineWidth: 2,
            lineColor: Highcharts.getOptions().colors[3],
            fillColor: 'white'
        }
    };
    all_series[2] = accu_series;
}