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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...