<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Formatting axis lables on a time based chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Formatting-axis-lables-on-a-time-based-chart/m-p/367670#M108420</link>
    <description>&lt;P&gt;try using chart instead of timechart, though if you're exporting a PDF, it might not export the labels. i'm adding the eval just to reformat the time if you need it, feel free to remove.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|chart span=1d count by threadpool|eval _time=strftime(_time,"%Y/%m/%d")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|bucket span=1d _time|eval _time=strftime(_time,"%Y/%m/%d")|stats count by _time threadpool
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 21 Jun 2017 15:02:11 GMT</pubDate>
    <dc:creator>cmerriman</dc:creator>
    <dc:date>2017-06-21T15:02:11Z</dc:date>
    <item>
      <title>Formatting axis lables on a time based chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formatting-axis-lables-on-a-time-based-chart/m-p/367669#M108419</link>
      <description>&lt;P&gt;I have a search that uses timechart to show a count of certain events per day for a one month period. Nothing fancy:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=x earliest=-30d@d ... | timechart span=1d count by threadpool
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Works fine but of course it shows only about 5 X axis labels. I would prefer it show one for every day in the month. There is room for this but only if the date/time label can be reformatted. It currently shows as "Mon May 1 2017". That label is too long. So when I force a label per day using:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.axisLabelsX.majorUnit"&amp;gt;P0Y0M1DT0H0M0S&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now all the label text overlaps and it becomes unreadable. I can't find a way to reformat the date on a timechart (if this is possible let me know!), so how can I change my search to use "chart" and still get a data point per day per series?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;BR /&gt;
Using v5.0.14 (I know, we're way behind. I wish I could rotate the labels but that isn't supported.)&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 14:56:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formatting-axis-lables-on-a-time-based-chart/m-p/367669#M108419</guid>
      <dc:creator>tsmithsplunk</dc:creator>
      <dc:date>2017-06-21T14:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting axis lables on a time based chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formatting-axis-lables-on-a-time-based-chart/m-p/367670#M108420</link>
      <description>&lt;P&gt;try using chart instead of timechart, though if you're exporting a PDF, it might not export the labels. i'm adding the eval just to reformat the time if you need it, feel free to remove.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|chart span=1d count by threadpool|eval _time=strftime(_time,"%Y/%m/%d")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|bucket span=1d _time|eval _time=strftime(_time,"%Y/%m/%d")|stats count by _time threadpool
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Jun 2017 15:02:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formatting-axis-lables-on-a-time-based-chart/m-p/367670#M108420</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-06-21T15:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting axis lables on a time based chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formatting-axis-lables-on-a-time-based-chart/m-p/367671#M108421</link>
      <description>&lt;P&gt;Your second idea works great. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 20:11:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formatting-axis-lables-on-a-time-based-chart/m-p/367671#M108421</guid>
      <dc:creator>tsmithsplunk</dc:creator>
      <dc:date>2017-06-21T20:11:41Z</dc:date>
    </item>
  </channel>
</rss>

