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!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...