Define color for Data Visualization donut through code | UI Builder

Nico D
Tera Contributor

As the title says, we have a need to script the colors for our Data Visualizations (since if you select a scripted data source for the widget, the UI Builder kindly removes the option we need: "fixed element colors", man you gotta love this tool! so well done!!!).

nicodaniele_1-1780590662330.png

I tried searching online but I've found nothing as for some reason there is next to ZERO documentation on how things work in the UI Builder.

 

So my question is the following: is there a way to script the colors using data binding or some other method for Data Visualizations?

nicodaniele_2-1780590786714.png

 

Thank you

2 REPLIES 2

Tanushree Maiti
Tera Patron

Hi @Nico D 

 

Refer: 

Servicenow Doc: Create a pie or donut data visualization 

Servicenow Documentation:Colors in data visualizations 

Servicenow Doc , (use color Scheme) Create a pie, donut, or semi-donut visualization for a breakdown widget 

UI Builder Data Visualization Component - Specific element based colors for Vertical Bar and Pie 

UI Builder : How to create colourful Data visualization report in workspace/UI builder servicenow 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Unfortunately I hae already visited these links, they do not provide the answer I am looking for as I need to know how to properly script the colors for data visualizations.

 

Although in one we can find the source of my problems:

NicoD_0-1780643621267.png