Reporting

How to change the Y-axis display data labels on a scatter plot?

faisalchohan
New Member

Hi Splunk Members, 

I am relatively new to splunk and I wanted to ask a very basic question.

I would like to find out  "How  can I change the Y-axis display data labels on a scatter plot without comprising the 1 to 3 scale ?

from: 

  • 1 to "low"
  • 2 to "medium"
  • 3  to "high"

| eval Alert_Level = case(Alert_Level = "Very Poor", 1, Alert_Level = "Poor", 2, Alert_Level = "Fair" , 3 )

| table Xaxis Yaxis  Alert_Level 

faisalchohan_2-1649815181951.png

 

This is incorrect as this plot thinks it is a string rather then number.

| eval Alert_Level2 = case(Alert_Level = 1, "low", Alert_Level = 2, "medium", Alert_Level = 3 , "high" )

| table Xaxis Yaxis  Alert_Level2

faisalchohan_1-1649815059933.png

or else i was trying the below but not sure if i am doing it in a best way

HTML Source:

<option name="charting.chart.showDataLabels">high</option>
<option name="charting.axisTitleY.visibility">1:"Low", 2:"Medium", 3:"High"</option>

Your help would be much appreciated. Thanks

0 Karma

tshah-splunk
Splunk Employee
Splunk Employee

Hey @faisalchohan,

I don't think it is possible to change the labels on the Y-axis in any of the graph charts. Also, the charting.axisTitleY.visibility is to set if the title of the Y-axis should be visible or not. You can find information related to the parameter here - https://docs.splunk.com/Documentation/Splunk/8.2.6/Viz/ChartConfigurationReference#:~:text=charting.... 

You can transpose the data from Y-Axis to X-Axis and then use case conditions to change the mapping of the Alert_level.

---
If you find the answer helpful, an upvote/karma is appreciated
0 Karma

faisalchohan
New Member

Hi  @tshah-splunk

 

I really appreciated your response.

I have transpose the axis but it's the same result but showing on different axis. 

Are you able to share some example?

Thanks 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...