Splunk Search

How to set the x-axis limits of a line chart?

pschellen
New Member

I am trying to display a timechart on a line graph. The timechart looks back 24 hours to find specific events. My issue is that the line graph sets the minimum x-axis as the first event found in the time range and the maximum as the last event found.

How do I set the x-axis bounds of the line graph such that the line graph displays the entire time range?

Edit**
I can't give the full search string but the timechart pipe looks like this.

timechart fixedrange=true span=5m Count(Notice) as Count by Notice

Essentially there are events with a field called "Notice" and I'm just counting them in 5 minute intervals and making a timechart.

To reiterate with an example, I have found a time range with only one event that matches the criteria to be in the timechart. The timechart does not display the entire time range but just that one point.

linegraph of a timechart

0 Karma

lguinn2
Legend

timechart has an option called fixedrange to constrain the timerange to the actual data - did you perhaps use it?

timechart fixedrange=f count 

will set the range to the actual data

timechart fixedrange=t count 

will use the earliest and latest times that are set in the timerange picker.

Could you post the actual search string? You aren't giving very much information for us to work with here.

sundareshr
Legend

Are you setting span? Like this timechart span=1h count. Can you share your query?

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...