Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Fixed Element Colors Not Persisting on Column Visualization When Filter Applied (Platform Analytics)

yashsoni
Tera Contributor

Hi all,

I'm trying to set fixed colors per Risk Rating value on a stacked/column visualization in Platform Analytics Reporting (PAR) — specifically:

  • 1 - Critical → Red
  • 2 - High → Orange
  • 3 - Medium → Yellow

I've applied a color palette to the widget, and the new colors do show up initially. However, the colors are not staying fixed to the element value — when I apply a filter (or drill down) and the set of visible categories changes, the colors reassign to different Risk Rating values instead of staying locked to the same value every time.

Expected behavior: Critical should always render as Red, regardless of what filter is applied or which other categories are present/absent in the current view.

Actual behavior: Colors appear to be assigned by position/order in the result set, not by the actual field value — so filtering changes which category lands in which position, and the color shifts with it.

What I've tried:

  • Applying a custom Color Palette on the widget — colors show, but reshuffle on filter
  • Checking whether "Chart Colors" (fixed value → color mapping) can be applied to this visualization type but it is going to default UI14 only not to new Chart color as created one and no option to deactivate

Questions:

  1. Is there a supported way to lock a color to a specific element value (e.g., Critical = Red) on a column visualization in PAR, so it stays fixed regardless of filtering or drill-down?
  2. Is "Fixed element color" / Chart Colors supported on this visualization type, and if so, where exactly is it configured?
  3. Is this a known limitation, and if so, is there a documented workaround?

Instance release: [Australia]
Widget type: Column visualization, Platform Analytics Reporting

Any guidance appreciated — thanks!

1 REPLY 1

musislam
Kilo Sage

Hi yashsoni,

 

Taking your three questions in order, because the answer to 1 and 2 is yes and I think 3 is a red herring.

 

1. Yes, there is a supported way. The feature is called fixed element colors, and it is a different layer from the colour palette. A palette assigns colours by series position, which is exactly the behaviour you described - change which categories are present and the positions shift, so the colours shift with them. Fixed element colors bind a colour to the element value itself, so it survives filtering and drill-down.

 

2. Yes, it is supported on a column visualization in PAR, and this is where I think you have been caught out. Creating Chart Colors records on their own does nothing. The visualization has to be using fixed element colors, and that is turned on in the Configuration panel of the visualization, not in the Chart Colors table. The table only stores the bindings; the panel decides whether the chart consults them. That also explains "no option to deactivate" - you were looking in the wrong place for the switch.

 

The bindings live in Chart Colors [sys_report_chart_color], reachable at All > Platform Analytics Administration > Color Settings > Chart Colors. Each record binds a colour to a data source (table) + grouping or stacking element (field) + element value. Once a visualization is using fixed element colors, records get created automatically the first time a value appears, so you may find entries already sitting there.

 

I checked the table on an Australia instance to be sure of the shape. Around 126 records ship out of the box, for example:

 

incident / priority / 1 -> #E42338

incident / priority / 2 -> #E27918

incident / state / 2 -> #318047

 

That is why an out-of-box Priority chart keeps red on Critical however you filter it.

 

Now the bit I would check first, because your own post hints at it. You wrote your values as "1 - Critical", "2 - High", "3 - Medium". If that is a choice field, the stored value is 1, 2 and 3 - the label is only what you see. The Value field on a Chart Colors record has to match the stored value, so records saying Critical, High and Medium will match nothing at runtime and the chart will quietly fall back to palette colouring. That looks exactly like "Chart Colors is being ignored".

 

Two related traps from the same area:

- Value is case-sensitive.

- For reference-type fields, Value must be the sys_id of the target record, not the display label. If Risk Rating is a reference rather than a choice, this one gets everybody.

 

So the sequence I would follow:

1. Confirm what is actually stored in your risk rating field - check the choice values, or grab the sys_id if it is a reference.

2. Create three Chart Colors records against your table and that field using those stored values, with your hex codes.

3. Turn on fixed element colors for the visualization in its Configuration panel.

4. Re-apply your filter. The mapping should now hold.

 

3. Not a known limitation, and no workaround required. The palette simply is not the layer that does value-locked colour - that is what fixed element colors exists for.

 

If this gets it working, would you mind marking it as the recommended solution? It helps me keep supporting these reporting questions properly, and it makes it much easier for the next person hitting the same colour-drift behaviour to find a resolved answer in the Community.

 

Macki | Deloitte AU | Engineer Lead

Macki | Deloitte AU | Engineer Lead