Highcharts - bar chart columns too thin with too many series

Deadly 提交于 2019-12-11 07:39:04

问题


I am developing a angular2 application using highcharts, but i have a problem about showing a bar chart. I have applied their sample code of highcharts to my application. It works. But when i added extra series to the chart, the columns becomes unreasonably too thin. my result

I separately tried the sample code on JSfiddle with adding extra series to the code. It works however. ... workable example


回答1:


I've recently faced a very similar issue and even posted a question about it. The solution seems to be pretty easy - for me the problem was in outdated highcharts (5.0.8) and highcharts modules(exporting, boost, highcharts-more, heatmap) (v. 5.0.8), so if you cannot reproduce your local behavior in jsfiddle try setting particular version of highcharts libraries like I've done here.

<script src="https://code.highcharts.com/5.0.8/highcharts.js"></script>

However when I updated to highcharts 5.0.14 the problem disappeared.

Hope this helps!

UPDATE

The issue was with a boost.js module, in particular with seriesThreshold property was set to 10 by default (now it is 50). Please find a detailed answer with example here




回答2:


If you don't mind scrollable high-chart then this issue can be resolved. Instead of Highchart use HighStock library, it will provide additional "scrollbar" option which you can combine with X-axis max option to show the data properly.

Here is the Updated Link for same code

 scrollbar:{
    enabled:true
},
xAxis: {
     max:0
// rest of the code}

This answer will be good help to go in details.



来源:https://stackoverflow.com/questions/44453613/highcharts-bar-chart-columns-too-thin-with-too-many-series

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!