0

If you try to combine stacked series with a flag series there is an odd behaviour where only the flag series gets drawn. If you toggle it in the legend everything gets drawn properly.

http://jsfiddle.net/x9gaca75/

$("#container").highcharts({plotOptions: {series: {stacking: "normal"}}, ...});

What configuration am I missing to make this behave properly?

1 Answer 1

1

There is a bug in Highstock, where setting plotOptions.series.stacking will set the same for flags. Of course, stacking won't work for flags since those don't have values. In other words, workaround is to set stacking = false for flags:

    options.series.push({
        "stacking": false,  // disable stacking
        "show_in_legend": false,
        "name": "Flags",
        "type": "flags",
        "data": [{
            "x": 1432215000000.0,
            "title": "AM"
        }, {
            "x": 1432229400000.0,
            "title": "Midday"
        }, {
            "x": 1432245600000.0,
            "title": "Peak Hour"
        }, {
            "x": 1432247400000.0,
            "title": "Rolling, PM"
        }]
    });

Demo: http://jsfiddle.net/x9gaca75/1/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.