top of page

Add background image to a widget

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


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')
		
	})
})

Comentários

Avaliado com 0 de 5 estrelas.
Ainda sem avaliações

Adicione uma avaliação
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