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




BI Next Level white logo

BI Next Level is your trusted resource for BI customization, data solutions, and expert insights. Explore practical tips, scripts, and tutorials for tools like Sisense, Python, and SQL. Let’s transform your data into impactful insights together.

Quick Links
Connect with us
Copyright © 2024. All Rights Reserved. Designed, Developed & Maintained  by Intertoons
bottom of page