top of page

Display value labels inside bar

By default, in Column and Bar charts, all value labels are displayed outside bars. But here is a way to display values inside bar


Steps:

  1. Create bar/column chart. Make sure value label is enabled

  2. Add below script to the widget

  3. Save the script and refresh widget


widget.on('processresult',function(se,ev){
	
	ev.result.plotOptions.series.dataLabels.inside = true
	ev.result.plotOptions.series.dataLabels.align = 'right'
	ev.result.plotOptions.series.dataLabels.color = '#FFFFFF'

})

Here is a script to display both value label and category name inside bar




widget.on('processresult',function(se,ev){

	ev.result.xAxis.labels.align = 'left'
	ev.result.xAxis.labels.x = 5
	ev.result.xAxis.labels.style.color = '#FFFFFF'
	
	ev.result.plotOptions.series.dataLabels.inside = true
	ev.result.plotOptions.series.dataLabels.align = 'right'
	ev.result.plotOptions.series.dataLabels.color = '#FFFFFF'

})

197 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
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