繁体   English   中英

Highchart-如何在堆积条上设置minWidth?

[英]Highchart - How to set minWidth on stacked bar?

我在尝试在div内渲染Highchart时遇到麻烦。 我不知道为什么有些酒吧无法正确显示。

我在容器highchart div上设置了一个宽度值,期望条形图占据div的100%,但是正如您所看到的那样。

这是我设置Highchart选项的方式:

 var chart = new Highcharts.Chart({ chart: { type: 'bar', spacingBottom: 1, spacingTop: 1, spacingRight: 1, backgroundColor: null, renderTo: containerId }, colors: ['#8b878a', '#10914E', '#DBD311', '#7e8b00'], title: '', tooltip: { enabled: false }, xAxis: { labels:{ enabled: false } }, yAxis: { labels:{ enabled: false }, gridLineWidth:0, title: { enabled: false }, visibility: false }, legend: { enabled: false }, plotOptions: { series: { stacking: 'normal', dataLabels: { enabled: true, formatter: function() { if(this.series.options.showPercentageValue && this.series.options.percentageValue > minValueBarPercentage){ return (Math.round(this.series.options.percentageValue) + ' %'); //~~(elimina decimales) } }, style:{fontSize: '9px', color:'black', paddingBottom: '1px', fontWeight: 'bold'} }, pointPadding: 0, groupPadding: 0.1 } }, series: values }); 

任何想法?

这是发生的事情的图片>>> http://imgur.com/a/FEfpz

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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