简体   繁体   中英

Stacking columns but not lines in same chart highcharts

I have a line chart over a column chart. It works perfectly, the only problem being the lines are not in the right position in the chart(ie their positions do not correspond with their value).

I believe this is due to the stacking set to normal. We use an in house application to generate our charts, which means not all properties that are available in Highcharts are exposed, and I do not have a jsfiddle for it.

Therefore my question is this : Is there a way to set stacking for the column chart but disable it on the line chart? I will need to set this in the html file.

Any help on this would be greatly appreciated!

Looking at the API for plotOptions.line.stacking you can explicitly set the stacking value on the line series with this:

series: [{
            type: 'line',
            stacking: null,
            data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
        }]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM