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:
Create bar/column chart
Enable Value Labels in Design panel of widget
Open Script Editor window of widget and add below script. Save the script
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
Comentarios