Dashboards & Visualizations

Changing value of x-axis field name and using it in a token

wu_weidong
Path Finder

I have a horizontal bar chart where the x-axis values are "fruits", "books", "devices" and "clothes". The x-axis title is "things". I want to change "fruits" to "food", and "devices" to "games". So I used the command "replace fruits with food in things" and similar with "devices", which worked.

Now I want to be able to click on one of the bars and with the x-value, display another panel with the x-value in the query. So I set the token "$things_v$" with "$click.value$" as the drilldown value. The query in this second panel is something like "index=main_ind things="$things_v$" | top field_a". If I did not change "fruits" to "food", and "devices" to "games", I am able to get the correct results from this query. But with the replace command, I can't get any results when I click on the bar for "food" or "games". I suspect that the query is using "food" and "games" as the filter and so did not return anything.

How can I replace the x-values, and still be able to query the original data with the new (or old) x-values?

0 Karma
Get Updates on the Splunk Community!

Index This | What’s a riddle wrapped in an enigma?

September 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

BORE at .conf25

Boss Of Regular Expression (BORE) was an interactive session run again this year at .conf25 by the brilliant ...

OpenTelemetry for Legacy Apps? Yes, You Can!

This article is a follow-up to my previous article posted on the OpenTelemetry Blog, "Your Critical Legacy App ...