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

DownloadColor Manager

Introduction

Colors get assigned to values in a widget based on the order they appear and the colors in your current pallete. The color manager plugin improves this with two main features:
  1. Synchronize colors on a dashboard. This ensures that a category will have the same color across all widgets. For example, if you have multiple widgets that reference the state of ‘New York’, the visualizations for ‘New York’ will be the same color. The colors used will be taken from the palette.
  2. Define colors for a category. This enables you to assign specific colors for specific categories. For example, you could define the color for ‘New York’ to be blue (#0000FF in hexadecimal), and all visualizations for ‘New York’ will be the same shade of blue.
  3. Ignore Widgets in the Dashboard. If you don't want a widget to do included, you can put the widget id into an ignore list. For example- if you are using conditional coloring, you'll want to have it be ignored by the color manager.

1. Synchronizing Colors

  1. Download the attachment and unzip the contents into your C:\Program Files\Sisense\PrismWeb\plugins\ folder. If you are using version 7.2 and higher unzip the contents into your C:\Program Files\Sisense\app\plugins\ folder.  If the plugins folder doesn't exist, please create it.
  2. Open the script editor for the dashboard you'd like to synchronize the colors on. We have documentation on this feature here: https://www.sisense.com/documentation/extending-dashboard-functiona...
  3. Put in the following lines of code into your dashboard script
ignoreList=[];
manageColors(dashboard,ignoreList);

2. Define Colors

When you use this feature, if a value in your dashboard doesn’t have a color defined, it will be assigned one from the color palette. We recommend using hexadecimal color notation.
  1. Open the file  C:\Program Files\Sisense\PrismWeb\plugins\manageColors\colorDictionary.js in a text editor, such as notepad. You may need to first open Notepad as an administrator, and then open the file.
  2. Start adding a comma separated list into this file, with the structure of
'Category':'Color'
  1. Save the File and refresh the dashboard.

 3. Ignore Widgets

 In the dashboard script editor, there is a variable called ignoreList. You can put the id of each widget that you’d like to skip over in this dashboard into a comma separated list.

Supported Widgets

  • Column/Bar- If you only are using categories, the value in the category will be used for the coloring. Otherwise, the values in the break by are used.
  • Pie chart
  • Line chart/area chart- Line colors are only used if there is a break by in the chart.
  • Polar Chart
  • Scatter Chart
Comments
gowtham_sisense
Sisense Team Member
Sisense Team Member

Quick Update

The plugin is not applying the colors on the Column/Bar Charts where there is a Break By present.
To fix this issue, do the following to the manageColors.js file in this plugin's folder. 

1. Add the following snippet after Line 37 of the Code. 

var resultMembers = args.result.series[i].data; 
resultMembers.forEach(function(member, index){
	if(member.color != null){
		member.color = getColor(curCategory);
	}
});

 2. Check if the code looks like the following after adding the above snippet. 

gowtham_sisense_0-1680062641787.png

3. Save the file

4. Disable and Enable the plugin from the "Add Ons" page on the Admin tab. 

This should fix it. 

Version history
Last update:
‎03-02-2023 09:25 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 community@sisense.com