开发者

Highcharts Columns with empty columns

开发者 https://www.devze.com 2023-04-13 05:41 出处:网络
I want to show a column chart that will show empty columns on days without data.I have previo开发者_StackOverflow中文版usly done this in amCharts, but trying to switch everything over to js charting.

I want to show a column chart that will show empty columns on days without data. I have previo开发者_StackOverflow中文版usly done this in amCharts, but trying to switch everything over to js charting.

Here is an example: https://skitch.com/jhanifen/gy324/jhanifen-skitch.com

Basically if I could change the color of individual columns that would also work.


Answer provided on Highcharts forum.

http://highslide.com/forum/viewtopic.php?f=9&t=12873

You can set the y value to 100, and set a secondary value to the actual value, which you can then grab in the tooltip formatter. see this example: http://jsfiddle.net/jlbriggs/BLxUL/

Depending on which you have more of, you can either set the bar color in the plotOptions, and call the 'blank' color in the data array when needed, or the other way around (as in the example)

Thanks jlbriggs!

0

精彩评论

暂无评论...
验证码 换一张
取 消