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




178 views0 comments

Comentarios

Obtuvo 0 de 5 estrellas.
Aún no hay calificaciones

Agrega una calificación
bottom of page