Dashboards & Visualizations

change colour of bar chart column dynamically (depending on dropdown input)

EricMueller0619
New Member

I do have the following problem with dynamic highlighting a selected column:

The bar chart i created wants to show the amount of errors by stations (in a manufacturing line e.g.). Furthermore you can select a specific station via dropdown. Finally the selected one is going to change the colour (others do not change). So far it is only working if i change the first dropdown input (which is the production line, on which all stations depend). But if i just change station, the changing of colours does not work anymore. the difficult thing is: stations depend, as already mentioned, on the lines, and the number of stations is also different. So for example, we do have 5 for a line, then 15 for another. That might be another problem why the colour-changing process is not working properly.

Code looks like:

          <query>index=... sourcetype=... Pseudo=Nein Quittiert=Ja Location=$lbl_location$ Product=$lbl_product$ Line=$lbl_line$ 
          Dauer_Minuten<480
| chart sum(Dauer_Minuten) over Line by Station limit=20 |table Line $lbl_station$ *</query>
...
<option name="charting.seriesColors">[0xffff00,0xff00,0xff00,0xff00,0xff00,0xff00,0xff00,0xff00,0xff00,0xff00,0xff00,0xff00,0xff00,0xff00,0xff00,0xff00]</option>

We tried different things like changing the option charting.seriesColors settings, but nothing has really worked yet.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...