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!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...