Assigning Specific Colors to Individual Values in Platform Analytics

BhanutejaRD
Tera Contributor

 

Hi Everyone,

I have a question regarding Platform Analytics data visualizations.

Is it possible to define and assign specific bar colors to individual values in a chart?

For example, if I create a Bar Chart using the Incident table as the data source and group by the State field, I would like each state value to always display a predefined color as shown below:

  • Assigned → Blue
  • In Progress → Orange
  • On Hold → Yellow/Amber
  • Resolved → Light Green
  • Closed → Dark Green
  • Cancelled → Red

Can Platform Analytics support assigning fixed colors to individual field values in this manner, rather than using the default chart color scheme?

Please let me know if this is possible and, if so, how it can be configured.

3 ACCEPTED SOLUTIONS

Vishnu Surendra
Tera Expert

@BhanutejaRD 

To configure custom colors for different state values in your bar graph, follow these steps:

  1. Go to Color Charts under Platform Analytics Administration.
  2. Click New and create a color configuration:
    • Name: Incident
    • Element: State
    • Value: 1
    • Select the color you want to display when the State value is 1.
    • Save the record.
  3. Repeat the same process for the other State values, selecting a different color for each value as required.
  4. Open the Data Visualization board where you created the bar graph.
  5. On the right side, open Configuration and go to Color.
  6. Set Color Type to Fixed Element Color.
  7. Save the configuration.

The bar graph will now display the colors you configured for each Incident State value.

View solution in original post

Anand__99
Mega Sage

Hi @BhanutejaRD ,

 

Follow the steps to configure this:

  1. Navigate to "sys_report_chart_color" table.
  2. Search for Name=incident and Element=state
  3. The list of default configuration will appear.
  4. Open the records and update the configuration based on the value
  5. If no default records exists create new record with following details:
    1. Name=table_name
    2. Element = field_name
    3. Value=value on which this color applies
    4. Color Name and color

 

Thanks

Anand

 

 

View solution in original post

vaishali231
Kilo Sage

Hey @BhanutejaRD 

Platform Analytics supports assigning fixed colors to individual field values in a visualization. For your requirement, you should use Fixed element color instead of the default color palette.

For example, for an Incident bar chart grouped by State, you can maintain a consistent color mapping such as:

Incident State

Color

Assigned

Blue

In Progress

Orange

On Hold

Yellow/Amber

Resolved

Light Green

Closed

Dark Green

Cancelled

Red

Configuration

Create or open the Bar Chart and configure it as follows:

Data source: Incident
Metric: Count of Incident
Group by: State

Then navigate to:

Presentation → Colors → Set color type → Fixed element color

vaishali231_0-1786620609550.png

 

After selecting Fixed element color, use Manage fixed element colors to configure the colors for the individual State values.

Platform Analytics stores these mappings in the Chart Colors [sys_report_chart_color] table, where the color is associated with the specific table, grouping element, and element value.

vaishali231_1-1786620719222.png

 

 

This is preferable to using a normal Color Palette, because a palette generally assigns colors based on the position/order of the data. With fixed element colors, the color is associated with the actual value.

For example, even if the order of the Incident States changes, Closed will continue to use the configured dark green color, rather than receiving a different color based on its position in the chart.

Important consideration

The exact State values available for configuration depend on the values present in your Incident data and the choice values configured for the State field. Therefore, make sure the required State values exist before configuring their fixed colors.

So, for this requirement, the recommended approach is:

Incident → Count → Group by State → Presentation → Colors → Fixed element color → Manage fixed element colors

This provides a consistent and maintainable color mapping for Incident States across Platform Analytics visualizations.

*************************************************************************************************************************************

If this response helps, please mark it as Accept as Solution and Helpful.

Doing so helps others in the community and encourages me to keep contributing.

Regards

Vaishali Singh

Servicenow Developer
Linkedin - https://www.linkedin.com/in/vaishali-singh-2273361bb




View solution in original post

3 REPLIES 3

Vishnu Surendra
Tera Expert

@BhanutejaRD 

To configure custom colors for different state values in your bar graph, follow these steps:

  1. Go to Color Charts under Platform Analytics Administration.
  2. Click New and create a color configuration:
    • Name: Incident
    • Element: State
    • Value: 1
    • Select the color you want to display when the State value is 1.
    • Save the record.
  3. Repeat the same process for the other State values, selecting a different color for each value as required.
  4. Open the Data Visualization board where you created the bar graph.
  5. On the right side, open Configuration and go to Color.
  6. Set Color Type to Fixed Element Color.
  7. Save the configuration.

The bar graph will now display the colors you configured for each Incident State value.

Anand__99
Mega Sage

Hi @BhanutejaRD ,

 

Follow the steps to configure this:

  1. Navigate to "sys_report_chart_color" table.
  2. Search for Name=incident and Element=state
  3. The list of default configuration will appear.
  4. Open the records and update the configuration based on the value
  5. If no default records exists create new record with following details:
    1. Name=table_name
    2. Element = field_name
    3. Value=value on which this color applies
    4. Color Name and color

 

Thanks

Anand

 

 

vaishali231
Kilo Sage

Hey @BhanutejaRD 

Platform Analytics supports assigning fixed colors to individual field values in a visualization. For your requirement, you should use Fixed element color instead of the default color palette.

For example, for an Incident bar chart grouped by State, you can maintain a consistent color mapping such as:

Incident State

Color

Assigned

Blue

In Progress

Orange

On Hold

Yellow/Amber

Resolved

Light Green

Closed

Dark Green

Cancelled

Red

Configuration

Create or open the Bar Chart and configure it as follows:

Data source: Incident
Metric: Count of Incident
Group by: State

Then navigate to:

Presentation → Colors → Set color type → Fixed element color

vaishali231_0-1786620609550.png

 

After selecting Fixed element color, use Manage fixed element colors to configure the colors for the individual State values.

Platform Analytics stores these mappings in the Chart Colors [sys_report_chart_color] table, where the color is associated with the specific table, grouping element, and element value.

vaishali231_1-1786620719222.png

 

 

This is preferable to using a normal Color Palette, because a palette generally assigns colors based on the position/order of the data. With fixed element colors, the color is associated with the actual value.

For example, even if the order of the Incident States changes, Closed will continue to use the configured dark green color, rather than receiving a different color based on its position in the chart.

Important consideration

The exact State values available for configuration depend on the values present in your Incident data and the choice values configured for the State field. Therefore, make sure the required State values exist before configuring their fixed colors.

So, for this requirement, the recommended approach is:

Incident → Count → Group by State → Presentation → Colors → Fixed element color → Manage fixed element colors

This provides a consistent and maintainable color mapping for Incident States across Platform Analytics visualizations.

*************************************************************************************************************************************

If this response helps, please mark it as Accept as Solution and Helpful.

Doing so helps others in the community and encourages me to keep contributing.

Regards

Vaishali Singh

Servicenow Developer
Linkedin - https://www.linkedin.com/in/vaishali-singh-2273361bb