Highcharts酒吧与非堆叠百分比系列 [英] Highcharts bar with non-stacked percent series
问题描述
我使用:
<$ p
我想创建具有非堆叠百分比值的Highcharts条形图。 $ p> plotOptions.bar.stacking ='percent'
但是这个堆栈所有系列都在100%以上。我希望每个系列都可以呈现为不同的栏。
我还有其他方法可以处理系列数据吗?
是的,您指定的是您希望图表堆叠条形图的具体方式。
要查看标签/工具提示等占总数的百分比,您需要遍历数据并计算所有数据。然后,您使用格式化程序输出右侧轴标签,工具提示,数据标签等的值。 示例
:
I want to create Highcharts bar chart with non-stacked percentage values.
I use:
plotOptions.bar.stacking = 'percent'
But this stack all series on top another to get to 100%. I want each series to be rendered as different bar.
I there any way doing it other than processing series data myself?
Yes, what you've specified there is how you want the chart to stack the bars, specifically.
To see labels/tooltips, etc as % of total, you'll need to loop through the data and calculate it all.
Then you use the formatters to output the right values for the axis labels, the tooltip, the data labels, etc
Example
:
这篇关于Highcharts酒吧与非堆叠百分比系列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!