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!

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...