Showing results for 
Search instead for 
Did you mean: 
Community Team Member
Community Team Member
This article will show how to modify the style of the legend in you widget.
  1.  Open you widget in Edit mode.
  2. From the Options Menu  choose "Edit Script" to open the script editor.
3. Copy and paste the following code into the script editor.
widget.on('processresult', function(se, ev){

/************* Configure here *********/
 var color = "#00ff00";
 var fontWeight = "bold";
 var fontSize = "24px";
 var legend = ev.result.legend;
 legend.itemStyle.color = color;
 legend.itemStyle.fontWeight = fontWeight;
 legend.itemStyle.fontSize = fontSize;
4. Modify the color, fontWeight and fontSize values to meet your style requirements, or comment out unneeded lines.

5. Refresh the page and click "Apply".
The example code above will change the legend style from the default style
to this style:
Version history
Last update:
‎03-02-2023 09:45 AM
Updated by:
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: