<?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: Multiple stacked columns in timechart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96054#M24798</link>
    <description>&lt;P&gt;how do you mean ?   The above is a complete dashboard - which can be saved&lt;/P&gt;</description>
    <pubDate>Wed, 17 Apr 2013 14:43:26 GMT</pubDate>
    <dc:creator>jonuwz</dc:creator>
    <dc:date>2013-04-17T14:43:26Z</dc:date>
    <item>
      <title>Multiple stacked columns in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96050#M24794</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I have data that reports page views per hour, per type of page (home page, search page, product page). I can draw a chart that displays stacked bars per hour with counts of page views for each of the page type.&lt;/P&gt;

&lt;P&gt;Using this data, I can filter to get results only for a specific domain (host), so for example I can get the page view stats per hour, per page for host X. I can do the same then for host Y by changing the filtering.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#   _time                   Home    Search  Details
1   4/2/13 12:00:00.000 AM  8       15      27
2   4/2/13 1:00:00.000 AM   11      23      34
3   4/2/13 2:00:00.000 AM   15      31      43
4   4/2/13 3:00:00.000 AM   5       10      12
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The issue I'm having is when I want to display the data from host X and host Y on the same chart to be able to see them side by side. This would imply that data from host X is on a stacked bar, while that from host Y is on a different one. &lt;/P&gt;

&lt;P&gt;The tabular data is like this (prefixed with X and Y for the hosts):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#   _time                   X:Home  X:Search    X:Details   Y:Home  Y:Search    Y:Details
1   4/2/13 12:00:00.000 AM  8       15          27          6       13          20
2   4/2/13 1:00:00.000 AM   11      23          34          13      18          27
3   4/2/13 2:00:00.000 AM   15      31          43          17      42          61
4   4/2/13 3:00:00.000 AM   5       10          12          2       5           8
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is this possible? Do you have any suggestions on how it can be done?&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2013 11:59:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96050#M24794</guid>
      <dc:creator>alexr</dc:creator>
      <dc:date>2013-04-16T11:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple stacked columns in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96051#M24795</link>
      <description>&lt;P&gt;Could you please provide your search?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2013 13:39:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96051#M24795</guid>
      <dc:creator>rechteklebe</dc:creator>
      <dc:date>2013-04-16T13:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple stacked columns in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96052#M24796</link>
      <description>&lt;P&gt;Yup. Example :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;SuperChart&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;chart&amp;gt;
      &amp;lt;searchString&amp;gt;* | timechart count as c | eval c2=c | eval c3=c | eval c4=c | eval c5=c | eval c6=c &amp;lt;/searchString&amp;gt;
      &amp;lt;earliestTime&amp;gt;-24h@h&amp;lt;/earliestTime&amp;gt;
      &amp;lt;latestTime&amp;gt;@h&amp;lt;/latestTime&amp;gt;
      &amp;lt;title&amp;gt;SuperChart&amp;lt;/title&amp;gt;
      &amp;lt;option name="charting.data1"&amp;gt;view&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.data1.table"&amp;gt;@data&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.data1.columns"&amp;gt;[0,1,2,3]&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.chart.data"&amp;gt;@data1&amp;lt;/option&amp;gt;
      &amp;lt;!-- set chart2 to use columns 0,4,5, where 0 is time, 4 + 5 are data --&amp;gt;
      &amp;lt;option name="charting.data2"&amp;gt;view&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.data2.table"&amp;gt;@data&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.data2.columns"&amp;gt;[0,4,5,6]&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.chart2.data"&amp;gt;@data2&amp;lt;/option&amp;gt;
      &amp;lt;!-- splunk doesnt suppory 2 Y axis, so we have to clone --&amp;gt;
      &amp;lt;option name="charting.axisY2"&amp;gt;#axisY&amp;lt;/option&amp;gt;
      &amp;lt;!-- clone the Yaxis into axisY2 --&amp;gt;
      &amp;lt;option name="charting.axisLabelsY2"&amp;gt;#axisLabelsY&amp;lt;/option&amp;gt;
      &amp;lt;!-- clone the Yaxis Labels --&amp;gt;
      &amp;lt;option name="charting.axisLabelsY2.axis"&amp;gt;@axisY2&amp;lt;/option&amp;gt;
      &amp;lt;!-- associate the new Y2 axis-labels with the Y2 axis --&amp;gt;
      &amp;lt;!--create the 1st chart --&amp;gt;
      &amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.chart.columnAlignment"&amp;gt;0&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.axisTitleY.text"&amp;gt;CPU&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.chart.columnSpacing"&amp;gt;20&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.chart.useAbsoluteSpacing"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.axisLabelsY.placement"&amp;gt;left&amp;lt;/option&amp;gt;
      &amp;lt;!--create the 2nd chart --&amp;gt;
      &amp;lt;option name="charting.chart2"&amp;gt;column&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.chart2.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.chart2.columnSpacing"&amp;gt;20&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.chart2.useAbsoluteSpacing"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.chart2.columnAlignment"&amp;gt;0.5&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.chart2.axisY"&amp;gt;@axisY2&amp;lt;/option&amp;gt;
      &amp;lt;!-- the Yaxis of chart 2 is a link to charting.axisY2 --&amp;gt;
      &amp;lt;option name="charting.axisTitleY2"&amp;gt;axisTitle&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.axisTitleY2.text"&amp;gt;Memory&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.axisLabelsY2.placement"&amp;gt;right&amp;lt;/option&amp;gt;
      &amp;lt;!-- throw the structure to layout --&amp;gt;
      &amp;lt;option name="charting.layout.charts"&amp;gt;[@chart,@chart2]&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.layout.axisLabels"&amp;gt;[@axisLabelsX,@axisLabelsY,@axisLabelsY2]&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.layout.axisTitles"&amp;gt;[@axisTitleX,@axisTitleY,@axisTitleY2]&amp;lt;/option&amp;gt;
    &amp;lt;/chart&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You will need to play with "charting.chartX.columnSpacing" and possibly add "charting.chartX.columnStyle.width" to each of the charts to make it look really pretty though.&lt;/P&gt;

&lt;P&gt;The timechart should output rows like this :&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com//storage/2-stacked2.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;and will create a chart like this :&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com//storage/2-stacked_1.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;data1.columns and data2.columns define what columns in the search output get added to which stacked bar chart.&lt;/P&gt;

&lt;P&gt;Both need column 0 - the time&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2013 17:18:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96052#M24796</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-04-16T17:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple stacked columns in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96053#M24797</link>
      <description>&lt;P&gt;Perfect. I would like to be able to set this up as a saved report. Is that possible?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 11:48:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96053#M24797</guid>
      <dc:creator>alexr</dc:creator>
      <dc:date>2013-04-17T11:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple stacked columns in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96054#M24798</link>
      <description>&lt;P&gt;how do you mean ?   The above is a complete dashboard - which can be saved&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 14:43:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96054#M24798</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-04-17T14:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple stacked columns in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96055#M24799</link>
      <description>&lt;P&gt;I meant to have this as a report, not a dashboard. But I will go ahead and mark your response as accepted because it's resolving the issue and it's also useful in terms of explanations. Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2013 15:23:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96055#M24799</guid>
      <dc:creator>alexr</dc:creator>
      <dc:date>2013-04-18T15:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple stacked columns in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96056#M24800</link>
      <description>&lt;P&gt;Great Jonuwz!&lt;BR /&gt;
But:&lt;BR /&gt;
This works in Splunk 5, but not in Splunk 6 &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;
Any idea to have it for Splunk 6!?&lt;BR /&gt;
Please! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Thx, Robert&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2014 12:37:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96056#M24800</guid>
      <dc:creator>Rocket66</dc:creator>
      <dc:date>2014-02-20T12:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple stacked columns in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96057#M24801</link>
      <description>&lt;P&gt;Never used splunk 6. From what I've heard, if you use simpleXML in splunk 6 the advanced charting capabilities are disabled. You'd need to convert the dashboard to advancedXML, then change the JSchart module to FlashChart. This will break PDF conversion though.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2014 18:14:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-stacked-columns-in-timechart/m-p/96057#M24801</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2014-02-22T18:14:01Z</dc:date>
    </item>
  </channel>
</rss>

