top of page

Add background image to a widget

Updated: Nov 27, 2024

Below script allow us to add background image to a widget.

ree

Steps:

  1. Create a widget. (supported widget types : bar, column, area, line, pie, scatter)

  2. Add below script to widget and update then variable 'imageURL' with URL of image

  3. Save the script and refresh widget


widget.on('processresult', function(se, ev){
	
	imageURL = 'paste your image url here'
	
	//set background image
	ev.result.chart.plotBackgroundImage = imageURL 
	
	//set transparency to bars
	$.each(ev.result.series, function(index, value){
		value.borderWidth = 2
		value.borderColor = value.color
		value.borderRadius = 2
		
		value.color = Highcharts.color(value.color).setOpacity(0.6).get('rgba')
		
	})
})

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