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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...