Dashboards & Visualizations

How to put Multiple labels on x-axis of bae chart?

POR160893
Builder

Hi,

I have a bar chart and I need to put multiple labels on the x-axis.

So. this is what I currently have:

POR160893_0-1657534879687.png

 



I am being asked to put the necessary label on the legend also under each bar on the x-axis .... is that possible?


Many thanks as always 🙂

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

The random values are just part of the runanywhere example, you were supposed to look at it and find the useful pieces for your usecase. Now that you have provided an example of what you are doing, it is easier to provide a closer solution

| inputlookup Migration-Status-McAfee2.csv
| fillnull value=null
| eval dummy = 'Migration Comments'
| chart count over "Migration Comments" by dummy

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

Do you mean something like this?

| makeresults count=100
| eval state=mvindex(split("Done|In progress|Not started","|"),random()%3)
| stats count by state
| eval dummy=state
| chart values(count) as count by state dummy
0 Karma

POR160893
Builder

Yes so close, but I would be using it with a inputlookup with specific values.
When I use your example, it is not using the inputlookup even when I use it in the query.
How can I make it NOT random?

This is my original query with specific values for the 3 states in the inputlookup:
| inputlookup Migration-Status-McAfee2.csv
| fillnull value=null
| eval dummy = 0
| chart count over dummy by "Migration Comments"

So, visually it is exactly what I need but I can't have any random influence on the values.


Is this possible?

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The random values are just part of the runanywhere example, you were supposed to look at it and find the useful pieces for your usecase. Now that you have provided an example of what you are doing, it is easier to provide a closer solution

| inputlookup Migration-Status-McAfee2.csv
| fillnull value=null
| eval dummy = 'Migration Comments'
| chart count over "Migration Comments" by dummy

POR160893
Builder

Exactly what I needed. Thanks and I obviously gave some some deserved Karma too 😁

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...