高亮图标点显示不正确

时间:2011-09-21 15:39:15

标签: javascript jquery highcharts

我以前从来没有遇到这种情况,我不知道为什么会发生这种情况。正如您所看到的,即使A点的数据点低于B,它也会出现在它上面(第一次屏幕截图)。奇怪的是,当我隐藏B行(第二次屏幕截图)时,A行正确地移动到正确的位置。

2 charts superimposed on one another showing incorrect plot points

when line B is hidden, line A correctly displays its plot points

我把一个jsfiddle放在一起来演示这个问题: http://jsfiddle.net/qwfZ9/1813/

以下代码:

var chart = new Highcharts.Chart({
    chart:{
        renderTo:"ChartArea",
        defaultSeriesType:"line",
        zoomType:"x",
        plotBackgroundColor:"#c8c8c8",
        backgroundColor:"#d5d5d5"
    },
    title:{
        text:"TEST"
    },
    series:[{
        name:"A",
        data:[21,21,21,21,23,23,26,24,24,24,24,26,26,21,19,19,19,23,23,23,21,22,22,22,21,16],
        pointStart:1314316800000,
        pointInterval:86400000,
        stack:0,
        type:"line",
        multiplier:1,
        dashStyle:"solid",
        color:"#AA4643"
    },{
        name:"B",
        data:[51,51,51,51,52,53,50,47,47,47,47,46,46,42,41,41,41,67,65,66,50,53,52,53,64,59],
        pointStart:1314316800000,
        pointInterval:86400000,
        stack:0,
        type:"line",
        multiplier:1,
        dashStyle:"solid",
        color:"#89A54E"}],
    plotOptions:{
        series:{
            stacking:"normal",
            borderColor:"black",
            shadow:false,
            borderWidth:0},
        area:{
            stacking:"normal",
            shadow:false,
            fillOpacity:0}},
    LastUpdated:0,
    colors:["#000000"],
    yAxis:{
        title:{
            text:"Test Counts"
        },
        labels:{
            rotation:0,
            align:"right"
        },
        plotOptions:[{color:"#000000",
                      width:2,
                      value:0,
                      id:"plotline-1"}],
        startOnTick:true,
        showFirstLabel:true,
        stackLabels:{
            enabled:true,
                     style:{
                         color:"black"}},
        min:0,
        max:100},
    xAxis:{
        title:{
            text:"Time"},
        type:"datetime",
        maxZoom:86400000,
        tickInterval:86400000,
        labels:{
            rotation:-40,
            align:"right",}},
    credits:{
        enabled:false},
    ZoomTypeChanger:null,
    yExtreme:null});

1 个答案:

答案 0 :(得分:3)

stacking:"normal"的{​​{1}}值中删除series似乎可以解决问题:

plotOptions

如果文档没有说明有某种原因导致转变,可能想要file a bug report