<?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: How to create a column chart with line chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-column-chart-with-line-chart/m-p/459368#M129673</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/84490"&gt;@jenniferhao&lt;/a&gt; what happens to count_1 and count_2. Which one of them are you using as stacks for each &lt;CODE&gt;reg&lt;/CODE&gt;? Seems like count_1 is some count and count_2 is the total which is used to calculate percent. Which implies you need to show count_1 as stacks for each reg over time. Is this correct?&lt;/P&gt;

&lt;P&gt;Also your percent in the table is per &lt;CODE&gt;reg&lt;/CODE&gt;. However, percent in your chart is per day. What is the aggregation to convert percent into daily percent? Is it &lt;CODE&gt;sum() across all reg&lt;/CODE&gt; or &lt;CODE&gt;avg() across all reg&lt;/CODE&gt;?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 01:52:18 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2020-09-30T01:52:18Z</dc:date>
    <item>
      <title>How to create a column chart with line chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-column-chart-with-line-chart/m-p/459366#M129671</link>
      <description>&lt;P&gt;I need to make a chat similar to the following picture base on the data below. &lt;BR /&gt;
The column chart should show 2 columns for count_num1 and count_num2 groups by reg. &lt;BR /&gt;
The line on the chart is the percentage which is count_num1/count_num2%. &lt;BR /&gt;
The X-Axis is _time, Y_Axis(left) is count_num1 and count_num2.Y_Axis(right) is percentage. &lt;/P&gt;

&lt;P&gt;Do you know have any idea to do this? Thanks. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;_time     reg     count_num1     count_num2   percentage&lt;BR /&gt;
2019-04-06  A      70895       138861322    0.05&lt;BR /&gt;
2019-04-06  B      84193       133480859    0.06&lt;BR /&gt;
2019-04-06  C      63006       89228628     0.07&lt;BR /&gt;
2019-04-06  D      67866       69157557     0.10&lt;BR /&gt;
2019-04-06  E      30690       21232372     0.14&lt;BR /&gt;
2019-04-06  F      192345 103945927 0.19&lt;BR /&gt;
2019-04-13  A      69890       138251510    0.05&lt;BR /&gt;
2019-04-13  B      63187       123896970    0.05&lt;BR /&gt;
2019-04-13  C      63685       91410203     0.07&lt;BR /&gt;
2019-04-13  D      78028       69272610     0.11&lt;BR /&gt;
2019-04-13  E      30406       20989378     0.14&lt;BR /&gt;
2019-04-13  F      198410 104328969 0.19&lt;BR /&gt;
2019-04-20  A      70214       137347777    0.05&lt;BR /&gt;
2019-04-20  B                81601 118578993    0.07&lt;BR /&gt;
2019-04-20  C      63630       91699136     0.07&lt;BR /&gt;
2019-04-20  D      81757       69488471     0.12&lt;BR /&gt;
2019-04-20  E      30529       21195290     0.14&lt;BR /&gt;
2019-04-20  F      199741 104744328 0.19&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/274461-pic1.png" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:52:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-column-chart-with-line-chart/m-p/459366#M129671</guid>
      <dc:creator>jenniferhao</dc:creator>
      <dc:date>2020-09-30T01:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a column chart with line chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-column-chart-with-line-chart/m-p/459367#M129672</link>
      <description>&lt;P&gt;hi please go to your chart?format viz&amp;gt; overlay and select your % as an overlay field, the rest of the columns choose stacked under general settings&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 15:26:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-column-chart-with-line-chart/m-p/459367#M129672</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-08-22T15:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a column chart with line chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-column-chart-with-line-chart/m-p/459368#M129673</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/84490"&gt;@jenniferhao&lt;/a&gt; what happens to count_1 and count_2. Which one of them are you using as stacks for each &lt;CODE&gt;reg&lt;/CODE&gt;? Seems like count_1 is some count and count_2 is the total which is used to calculate percent. Which implies you need to show count_1 as stacks for each reg over time. Is this correct?&lt;/P&gt;

&lt;P&gt;Also your percent in the table is per &lt;CODE&gt;reg&lt;/CODE&gt;. However, percent in your chart is per day. What is the aggregation to convert percent into daily percent? Is it &lt;CODE&gt;sum() across all reg&lt;/CODE&gt; or &lt;CODE&gt;avg() across all reg&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:52:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-column-chart-with-line-chart/m-p/459368#M129673</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-30T01:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a column chart with line chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-column-chart-with-line-chart/m-p/459369#M129674</link>
      <description>&lt;P&gt;@jenniferhao following is a run anywhere example based on the sample data and screenshot provided. It makes following assumptions&lt;/P&gt;

&lt;P&gt;1) count_1 is the field for stacks per day for each reg&lt;BR /&gt;
2) Percentage is average of &lt;CODE&gt;percentage&lt;/CODE&gt; of all regs per day&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7559i8EF052EC42BA75A8/image-size/large?v=v2&amp;amp;px=999" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
Following is the simpleXML code for the run anywhere example where SPL pipes till &lt;CODE&gt;| fields _time reg count_num1 count_num2 percentage&lt;/CODE&gt; generates the data as per your example.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Stacked Time chart with percent&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults 
| eval data="2019-04-06 A 70895 138861322 0.05;
2019-04-06 B 84193 133480859 0.06;
2019-04-06 C 63006 89228628 0.07;
2019-04-06 D 67866 69157557 0.10;
2019-04-06 E 30690 21232372 0.14;
2019-04-06 F 192345 103945927 0.19;
2019-04-13 A 69890 138251510 0.05;
2019-04-13 B 63187 123896970 0.05;
2019-04-13 C 63685 91410203 0.07;
2019-04-13 D 78028 69272610 0.11;
2019-04-13 E 30406 20989378 0.14;
2019-04-13 F 198410 104328969 0.19;
2019-04-20 A 70214 137347777 0.05;
2019-04-20 B 81601 118578993 0.07;
2019-04-20 C 63630 91699136 0.07;
2019-04-20 D 81757 69488471 0.12;
2019-04-20 E 30529 21195290 0.14;
2019-04-20 F 199741 104744328 0.19" 
| makemv data delim=";" 
| mvexpand data 
| rex field=data "(\s|\n?)(?&amp;lt;data&amp;gt;.*)" 
| makemv data delim=" " 
| eval _time=strptime(mvindex(data,0),"%Y-%m-%d"),
    reg=mvindex(data,1),
    count_num1=mvindex(data,2),
    count_num2=mvindex(data,3),
    percentage=mvindex(data,4) 
| fields _time reg count_num1 count_num2 percentage
| bin _time span=1d
| eventstats avg(percentage) as percentage by _time
| eval Time_Perc=_time."|".percentage
| chart latest(count_num1) by Time_Perc reg
| eval _time=mvindex(split(Time_Perc,"|"),0), Percentage=mvindex(split(Time_Perc,"|"),1)
| fields - Time_Perc
| table _time * Percentage
| timechart latest(*) as * cont=f&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.overflowMode"&amp;gt;ellipsisNone&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.rotation"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleX.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY2.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisX.abbreviation"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisX.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY.abbreviation"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.abbreviation"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.enabled"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.scale"&amp;gt;log&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.bubbleMaximumSize"&amp;gt;50&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.bubbleMinimumSize"&amp;gt;10&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.bubbleSizeBy"&amp;gt;area&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.nullValueMode"&amp;gt;gaps&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.overlayFields"&amp;gt;Percentage&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.showDataLabels"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.sliceCollapsingThreshold"&amp;gt;0.01&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.style"&amp;gt;shiny&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.layout.splitSeries"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.layout.splitSeries.allowIndependentYRanges"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.labelStyle.overflowMode"&amp;gt;ellipsisMiddle&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.mode"&amp;gt;standard&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.placement"&amp;gt;bottom&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.lineWidth"&amp;gt;2&amp;lt;/option&amp;gt;
        &amp;lt;option name="height"&amp;gt;434&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.enabled"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.scales.shared"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.size"&amp;gt;medium&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Aug 2019 18:31:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-column-chart-with-line-chart/m-p/459369#M129674</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-08-22T18:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a column chart with line chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-column-chart-with-line-chart/m-p/459370#M129675</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7560i512BF3DA3F3762EE/image-size/large?v=v2&amp;amp;px=999" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;To provide further feedback to my original question.&lt;BR /&gt;
I need to create a Time chart type diagram &lt;BR /&gt;
i have various KPI's for 1 type of metric i want stacked.  and then another type metric  stacked beside it.&lt;BR /&gt;
but for 2 fields side by side are not stacked.&lt;/P&gt;

&lt;P&gt;similar to the image below.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 20:16:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-column-chart-with-line-chart/m-p/459370#M129675</guid>
      <dc:creator>jenniferhao</dc:creator>
      <dc:date>2019-08-22T20:16:52Z</dc:date>
    </item>
  </channel>
</rss>

