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 ITSI & Correlated Network Visibility

  Now On Demand   Take Your Network Visibility to the Next Level In today’s complex IT environments, ...

Community Content Calendar, August edition

In the dynamic world of cybersecurity, staying ahead means constantly solving new puzzles and optimizing your ...

Pro Tips for First-Time .conf Attendees: Advice from SplunkTrust

Heading to your first .Conf? You’re in for an unforgettable ride — learning, networking, swag collecting, ...