Splunk Search

Display chart only within Time range where there data exists

Dark_Ichigo
Builder

I want to display a chart that automatically crops that whole chart to where there is data and not display any empty before or after time ranges where there is no data at all, how can this be done?

Please let me know if more information is required.

1 Solution

lguinn2
Legend

In your timechart command, use the option

fixedrange=false

for example

yoursearchhere
| timechart fixedrange=false count

then the timechart X-axis will be cropped to only the timerange that includes valid data.

Documentation for timechart command

View solution in original post

lguinn2
Legend

In your timechart command, use the option

fixedrange=false

for example

yoursearchhere
| timechart fixedrange=false count

then the timechart X-axis will be cropped to only the timerange that includes valid data.

Documentation for timechart command

sansay
Contributor

That worked perfectly for my purpose.
I combined data from 2 different days, and shifted the date of the first day so that timechart would show them at the same times, but I ended with an empty set. This solved my problem. Thank you very much!

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...