top of page

Add description to Widget

Updated: Nov 27, 2024

Here is a method for adding detailed information about the chart and data that will always appear at the bottom of a widget.



ree

Steps:

  1. Create widget

  2. Add below script to widget.

  3. Update text to be displayed and set format of text

  4. Save the script and refresh widget


descriptionSpace = 80

widget.on('processresult',function(se,ev){
	ev.result.chart.spacingBottom = descriptionSpace//to add required space to display description at bottom
})

//Bottom description
widget.on('domready', function(w, args){
	text = 'This is a description. This is a description. This is a description. This is a description. This is a description. This is a description. This is a description. This is a description. This is a description. '
	chart = w.chart[0][Object.keys(w.chart[0])[0]].hc
	chart.renderer.text(text, 15, chart.chartHeight - descriptionSpace+20)
		.css({
			width: chart.chartWidth-15,
			color: '#a0a0a0',
			'font-style': 'italic'
		  })
		.add();
});


Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating

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
bottom of page