Dashboards & Visualizations

How to create time chart when having trouble with x-axis?

jenniferbarlow_
New Member

Hi, 

I am creating a time chart on the average temperature ranges (max temp - min temp) in the UK over the last 30 years. 

This is my current code: 

 

index="midas_temp"  MET_DOMAIN_NAME=DLY3208 |eval trange=MAX_AIR_TEMP - MIN_AIR_TEMP|timechart avg(trange)

 

 Currently the X-axis displays the years 1992-2019 as separate years but I want to convert the X-axis into months of the year (i.e. January - December). So the graph shows the average daily temperature ranges from 1992-2019 over a year interval. 

Thanks 

Labels (2)
0 Karma

Stefanie
Builder

Try adding 

span=1mon

To the end of your search.. so it should look like

index="midas_temp"  MET_DOMAIN_NAME=DLY3208 |eval trange=MAX_AIR_TEMP - MIN_AIR_TEMP|timechart avg(trange) span=1mon

 

This is already going to be a very large graph. You should you would like it to show the average daily temperature from 1992-2019 ? If that's the case you can change it to say span=1d . 

0 Karma

jenniferbarlow_
New Member

This is still giving me a X-axis with values 1992-2019 rather than January - December 

0 Karma

Stefanie
Builder

I'm giving this some thought.

Would you be able to post a screenshot of your data & graph?

 

You're looking for the x-axis to be the months, yes? 

and then every plot on the graph is an average of the temperature for that day on 1992-2019? 

 

 

0 Karma

SanjayReddy
SplunkTrust
SplunkTrust

Hi @jenniferbarlow_ 

please add span=1mon  in timechart command 

|timechart span=1mon avg(trange)

0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...