admin管理员组文章数量:1410712
we are using highcharts and are trying to use stacked charts, but running into some issues. See the following fiddle:
/
I'm able to display the number to a given precision, however the data labels (which are the sum of the stack) are left unrounded. Is there any way to cut these data labels to precision X? The normal plotOptions.series.dataLabels.formatter don't seem to work here.
we are using highcharts and are trying to use stacked charts, but running into some issues. See the following fiddle:
http://jsfiddle/ggoforth/n5yba/
I'm able to display the number to a given precision, however the data labels (which are the sum of the stack) are left unrounded. Is there any way to cut these data labels to precision X? The normal plotOptions.series.dataLabels.formatter don't seem to work here.
Share Improve this question asked Aug 30, 2012 at 21:09 Greg Greg 6,6339 gold badges47 silver badges63 bronze badges2 Answers
Reset to default 2stackLabels: {
enabled: true,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
},
formatter: function() {
return Highcharts.numberFormat(this.total, 2, ',');
}
}
Demo
Looks like I needed yAxis.stackLabels.formatter which I didn't find until just now ;)
本文标签: javascripthighchartsprecision for stacked column chart data labelsStack Overflow
版权声明:本文标题:javascript - highcharts - precision for stacked column chart data labels - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744864426a2629261.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论