<?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: Specify timestamp display format for timechart axis labels in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Specify-timestamp-display-format-for-timechart-axis-labels/m-p/44089#M8239</link>
    <description>&lt;P&gt;That won't quite work, as the Time field will not necessarily be sorted in the right order, and furthermore if the data isn't distributed evenly, your time axis won't be even over time. You can use the &lt;CODE&gt;makecontinuous&lt;/CODE&gt; command to try to overcome the second problem.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Feb 2011 05:39:20 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2011-02-15T05:39:20Z</dc:date>
    <item>
      <title>Specify timestamp display format for timechart axis labels</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Specify-timestamp-display-format-for-timechart-axis-labels/m-p/44087#M8237</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;I want the timestamps for the X-axis labels of a timechart to have the following format:&lt;/P&gt;

&lt;P&gt;MM-DD HH:mm&lt;/P&gt;

&lt;P&gt;where HH:mm is in 24-h format, M designates month, m designates minute.&lt;/P&gt;

&lt;P&gt;Example:
"February 14th, 1PM" should look like "02-14 13:00"&lt;/P&gt;

&lt;P&gt;Does anyone now how &amp;amp; where this can be configured?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2011 21:34:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Specify-timestamp-display-format-for-timechart-axis-labels/m-p/44087#M8237</guid>
      <dc:creator>chendry</dc:creator>
      <dc:date>2011-02-14T21:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Specify timestamp display format for timechart axis labels</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Specify-timestamp-display-format-for-timechart-axis-labels/m-p/44088#M8238</link>
      <description>&lt;P&gt;You can use &lt;STRONG&gt;chart&lt;/STRONG&gt; to do the same as &lt;STRONG&gt;timechart&lt;/STRONG&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval Time = strftime(_time, "%m/%d %H:%M") | chart count as Total by Time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And it's easy to format a chart...&lt;/P&gt;

&lt;P&gt;EDIT:&lt;/P&gt;

&lt;P&gt;Based on gkanapathy's comment, it might be better to implement it like this to ensure proper sorting of the time values:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval Time = _time | chart count as Total by Time span=1h | eval Time=strftime(Time, "%m/%d %H:%M") 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Feb 2011 01:24:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Specify-timestamp-display-format-for-timechart-axis-labels/m-p/44088#M8238</guid>
      <dc:creator>Ron_Naken</dc:creator>
      <dc:date>2011-02-15T01:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Specify timestamp display format for timechart axis labels</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Specify-timestamp-display-format-for-timechart-axis-labels/m-p/44089#M8239</link>
      <description>&lt;P&gt;That won't quite work, as the Time field will not necessarily be sorted in the right order, and furthermore if the data isn't distributed evenly, your time axis won't be even over time. You can use the &lt;CODE&gt;makecontinuous&lt;/CODE&gt; command to try to overcome the second problem.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2011 05:39:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Specify-timestamp-display-format-for-timechart-axis-labels/m-p/44089#M8239</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-02-15T05:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Specify timestamp display format for timechart axis labels</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Specify-timestamp-display-format-for-timechart-axis-labels/m-p/44090#M8240</link>
      <description>&lt;P&gt;You should do the chart/timechart, then apply a rename and eval afterwards to solve these issues.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2011 05:43:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Specify-timestamp-display-format-for-timechart-axis-labels/m-p/44090#M8240</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-02-15T05:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Specify timestamp display format for timechart axis labels</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Specify-timestamp-display-format-for-timechart-axis-labels/m-p/44091#M8241</link>
      <description>&lt;P&gt;Thanks for your replies - &lt;/P&gt;

&lt;P&gt;The proposed method worked:&lt;/P&gt;

&lt;P&gt;... | timechart span=1m sum(HTTP_5xx) | fillnull value=0 | rename _time AS Time | eval Time=strftime(Time, "%m-%d %H:%M")&lt;/P&gt;

&lt;P&gt;However, using the above search command, the labels on the X-Axis disappear.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;This is how chart labels looked before ("bad" timestamp formatting, but proper labels):&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://www.freeimagehosting.net/uploads/99c1ee3d22.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;This is how chart labels look now (proper timestamp formatting, but labels not shown):&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://www.freeimagehosting.net/uploads/a13857dd1f.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;I use the following chart formatting option the force label visibility:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;          &amp;lt;param name="charting.primaryAxisLabels.majorLabelVisibility"&amp;gt;show&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, with the reformatted timestamps, the labels only partly appear (i.e. they are still cut off) when stretching the chart horizontally to ~ 2000 pixels...&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2011 17:06:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Specify-timestamp-display-format-for-timechart-axis-labels/m-p/44091#M8241</guid>
      <dc:creator>chendry</dc:creator>
      <dc:date>2011-02-15T17:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Specify timestamp display format for timechart axis labels</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Specify-timestamp-display-format-for-timechart-axis-labels/m-p/44092#M8242</link>
      <description>&lt;P&gt;I guess the cause for this is that after using strftime(), the chart values on the X-Axis are not anymore of type TIME, but CATEGORY. Unfortunately, I think that it is not possible to properly space the major labels for a CATEGORY axis because the param "charting.axisLabelsX.majorUnit" does not seem to exist for category axis type. Does anyone know how to space category labels?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2011 18:12:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Specify-timestamp-display-format-for-timechart-axis-labels/m-p/44092#M8242</guid>
      <dc:creator>chendry</dc:creator>
      <dc:date>2011-02-15T18:12:12Z</dc:date>
    </item>
  </channel>
</rss>

