top of page

Always display value labels outside column/bar

Value labels may occasionally overlap with column/bar labels. Changing the max value of yAxis is a simple technique to display value labels outside of a column or bar. Here's a script to dynamically alter the max value.





Steps:

  1. Create bar/column chart

  2. Enable Value Labels in Design panel of widget

  3. Open Script Editor window of widget and add below script. Save the script

  4. Refresh widget



widget.on('ready', function(se, ev){	
	chart = se.chart[0][Object.keys(se.chart[0])[0]].hc
	chart.yAxis[0].setExtremes(chart.yAxis[0].min, chart.yAxis[0].dataMax * 1.3)
});

This script supports Classic and Stacked bar/column charts




180 views0 comments

コメント

5つ星のうち0と評価されています。
まだ評価がありません

評価を追加
bottom of page