cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
Introduction
This article explains how to automatically set a color palette, based on the logged in user's group.
User 1 View:

User 2 View: 
Purpose/Benefits
In order to provide a better user experience, you may want to automatically define how your dashboards are colored based on the end user.  This plugin allows you to map color palettes to user groups, and swap the color palette when a user loads a dashboard.
Step 1 - Add The Plugin
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, just create it. After those files have been unzipped there, you may also have to restart the web server. 

STEP 2 - CONFIGURE THE PLUGIN

Open the config.js file to manage the groups/color palette mapping.  There is a groups property, which is a key-value pair for defining the name of the color palette for each group id.  Your config file should look something like this:
// Define config settings
var config = {
groups: {
"583ead06825d252849000025": "sisense",
"57d341a1105e6e9c3600006f": "vivid"
}
}
In order to figure out your group IDs, use the API Reference page

STEP 3 - ENABLE FOR VIEWERS

By default, viewer users are not allowed to change the color palette of a dashboard.  This can be adjusted by overriding the role through the API.  Look for the PUT /roles/{idOrName} endpoint in the v0.9 APIs, and specify consumer for the idOrName input.  Copy any paste the code below into the body, to allow viewers to change the color palette, then click the purple RUN button.  You should get a 200 response code back, if the API call was successful.
{
"manifest": {
"dashboards": {
"select_palette": true
}
}
}

NOTES/REFERENCE

  • Since users can belong to multiple groups, this plugin looks only at groups that have a matching entry in the config file, and then uses the first group from this filtered list
Version history
Last update:
‎03-02-2023 09:41 AM
Updated by:
Contributors
Community Toolbox

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

Product Feedback Forum:

Need additional support?:

Submit a Support Request

Sisense Privacy Policy