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
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...