<?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: Problem to make my bar chart to be stacked in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120834#M7019</link>
    <description>&lt;P&gt;Thanks, this is the search I've been playing with:&lt;BR /&gt;
index=* request_id=$request_id$ |`rex_stats`|eval System_CPU_load = round(System_CPU_load *100\,2)|stats max(System_CPU_load) as max_cpu_usage by task_id,phase_id|eval xlabel=phase_id|chart avg(max_cpu_usage) by xlabel,phase_id|rename xlabel AS phase_id|rename avg(max_cpu_usage) as "Average CPU Usage(%)"&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:07:45 GMT</pubDate>
    <dc:creator>martinovm</dc:creator>
    <dc:date>2020-09-28T15:07:45Z</dc:date>
    <item>
      <title>Problem to make my bar chart to be stacked</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120832#M7017</link>
      <description>&lt;P&gt;Hi ,&lt;BR /&gt;
I’m on Splunk version 4.3.2I have a simple query that I can render as a bar chart but I’ve a problem to make my bar chart to be stacked. Is there any requirement for the Splunk query in order to produce proper stacked bar chart. Is there something that I need to know?&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Martin&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2013 18:22:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120832#M7017</guid>
      <dc:creator>martinovm</dc:creator>
      <dc:date>2013-10-29T18:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to make my bar chart to be stacked</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120833#M7018</link>
      <description>&lt;P&gt;What is your search?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2013 18:33:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120833#M7018</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-10-29T18:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to make my bar chart to be stacked</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120834#M7019</link>
      <description>&lt;P&gt;Thanks, this is the search I've been playing with:&lt;BR /&gt;
index=* request_id=$request_id$ |`rex_stats`|eval System_CPU_load = round(System_CPU_load *100\,2)|stats max(System_CPU_load) as max_cpu_usage by task_id,phase_id|eval xlabel=phase_id|chart avg(max_cpu_usage) by xlabel,phase_id|rename xlabel AS phase_id|rename avg(max_cpu_usage) as "Average CPU Usage(%)"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:07:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120834#M7019</guid>
      <dc:creator>martinovm</dc:creator>
      <dc:date>2020-09-28T15:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to make my bar chart to be stacked</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120835#M7020</link>
      <description>&lt;P&gt;The only search-language piece, is to make sure you're using the timechart or chart command to have one field's values basically down the left hand side of the table, and a second field's values listed along the column headers of the table.  It looks like you're doing this already, and the rest of it is not something you do in the search language but rather in the dashboard settings. &lt;/P&gt;

&lt;P&gt;If you're using the dashboard wizard UI look inside the "Edit Visualization" options for a "stacked" option.  It should be pretty easy to find. &lt;/P&gt;

&lt;P&gt;If you're hand-editing simple XML,  then add &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;inside your &lt;CODE&gt;&amp;lt;chart&amp;gt;&lt;/CODE&gt; element. &lt;/P&gt;

&lt;P&gt;and if you're using the "Advanced XML", then put &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;param name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;inside a HiddenChartFormatter just upstream from your JSChart or FlashChart. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2013 19:03:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120835#M7020</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-10-29T19:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to make my bar chart to be stacked</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120836#M7021</link>
      <description>&lt;P&gt;Hey, thanks a lot for your response. I’ve used  the &lt;OBJECT&gt;&lt;PARAM name="charting.chart.stackMode" /&gt;stacked&lt;BR /&gt;
inside a HiddenChartFormatter  but it hasn’t helped. The solution was to add proper second breakthrough parameter to the chart.In my case it was request_id: so I’ve changed my search query to this one: &lt;BR /&gt;
index=* request_id=$request_id$ |&lt;CODE&gt;rex_stats&lt;/CODE&gt;|eval System_CPU_load = round(System_CPU_load *100,2)|stats max(System_CPU_load) as max_cpu_usage by request_id,task_id,phase_id|chart avg(max_cpu_usage) by request_id,phase_id|rename avg(max_cpu_usage) as "Average CPU Usage(%)"&lt;/OBJECT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:09:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120836#M7021</guid>
      <dc:creator>martinovm</dc:creator>
      <dc:date>2020-09-28T15:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to make my bar chart to be stacked</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120837#M7022</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/103"&gt;@sideview&lt;/a&gt; &lt;/P&gt;

&lt;P&gt;I am also facing the same issue. I am using the below query to generate a stacked bar graph but somehow it's not giving me stacked bar graph output. I tried selecting the stacked graph option but didn't helped. Also tried adding the XML entry but still no luck.&lt;/P&gt;

&lt;P&gt;Query:&lt;BR /&gt;
|inputlookup Tickets2.csv |search Status=Pending | eval tnow=now() | eval ptime=strptime(Logged_on,"%d/%m/%Y") | eval age=tnow-ptime | search age&amp;lt;1296000 | stats count by Logged_on,Type&lt;/P&gt;

&lt;P&gt;Not sure what's the error.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:13:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120837#M7022</guid>
      <dc:creator>qbolbk59</dc:creator>
      <dc:date>2020-09-29T22:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to make my bar chart to be stacked</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120838#M7023</link>
      <description>&lt;P&gt;&lt;CODE&gt;stats count by Logged_on, Type&lt;/CODE&gt;   will give you what's sometimes called "stats style" output rows.   This isn't what you want, and it can't really be "stacked". &lt;/P&gt;

&lt;P&gt;What you want is &lt;CODE&gt;chart count over Logged_on by Type&lt;/CODE&gt;,   and this is called "chart style" output rows.&lt;BR /&gt;&lt;BR /&gt;
And last but not least, "chart style" rows can be stacked. &lt;/P&gt;

&lt;P&gt;Further reading - sometimes in really advanced cases you need to kinda flip things around from one style of rows to another, and this is what xyseries and untable are for, if you've ever wondered.    xyseries is an advanced command whose main purpose in life is to turn "stats style" output rows into "chart style" output rows, and untable does the opposite. &lt;/P&gt;</description>
      <pubDate>Sat, 01 Dec 2018 00:10:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120838#M7023</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2018-12-01T00:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to make my bar chart to be stacked</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120839#M7024</link>
      <description>&lt;P&gt;Hi @sideview ... indeed. chart count by works fine for me. Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 09:56:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Problem-to-make-my-bar-chart-to-be-stacked/m-p/120839#M7024</guid>
      <dc:creator>qbolbk59</dc:creator>
      <dc:date>2018-12-07T09:56:37Z</dc:date>
    </item>
  </channel>
</rss>

