Splunk Search

xyseries vs timechart labels

andrewrm
New Member

I've got a chart using xyseries to show multiple data series over time, and it's working fine, except when searching over longer time periods all the date labels are truncated to ...

Using timechart it will only show a subset of dates on the x axis. Is there a way to replicate this using xyseries?

Tags (2)
0 Karma

chimell
Motivator

perhaps the following answer will help you in your task :

Look at this search code which is build with timechart command :

source="airports.csv" |timechart sum(number) as sum by City

The same code search with xyseries command is :

 source="airports.csv" |stats sum(number) as sum by _time , City
         | eval s1="Aaa" | makemv s1 | mvexpand s1
         | eval yval=case(s1=="Aaa",sum) 
         | eval series=City   | xyseries _time,series,yval    

Note that the code : convert timeformat="%a %b %d %Y" ctime(_time) AS c_time is used to change _time command format in the format which is almost like the _time format which appear when we use timechart command.

For more information , click on this link to understand well how use timechart vs xyseries
http://docs.splunk.com/Documentation/Splunk/6.2.0/Search/Chartmultipledataseries

Notice : just replace attentively all my field with your own field .

Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...