cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member

SET THE BACKGROUND OF CHARTS TO AN IMAGE

Open the script editor for a widget, and copy in the following code:
widget.on('render', function(sender,event){
 
 // URL to the background Image
 var imageLink = 'http://siliconangle.com/files/2014/12/BlackWhite-Logo.jpg'
 
 // Set the chart background as the image
 sender.queryResult.chart.plotBackgroundImage = imageLink;
  
})
Change the imageLink variable to the path of your image, and hit save.  Reload the web page and you should see an image as the background of your widget.
This functionality works only with the following chart types: scatter, pie, column, bar, line, area, & polar
Comments
Jordy
7 - Data Storage
7 - Data Storage

Hi,

We're using the following script to achieve a similar result:

widget.on("beforeviewloaded", (scope, args) => {
console.log(args);
args.options.chart.plotBackgroundImage = imaglink;

});

 

Both ways work for the widget, but the image export function suddenly forgets that it still has to apply filters to the widget, resulting in the background image being loaded, but also way too much data.

 

Did you find a way to overcome that issue?

 

- J

DRay
Community Team Member
Community Team Member

Hello @Jordy,

First of all, I know this answer has taken a while. These posts from intapiuser were created by an automated migration and are not monitored.

That's a great question. If you haven't found an answer yet, please post this in the Build Analytics Discussions section. We are happy to help you there.

Have a great day!

Version history
Last update:
‎03-02-2023 09:20 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: