<?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 Changing the order that bars appear in bar graph in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Changing-the-order-that-bars-appear-in-bar-graph/m-p/501933#M32890</link>
    <description>&lt;P&gt;Hello, I am trying to see if I can change the order that the bars appear in the bar graph.  Currently, the [legend order][1] is Blue, Green, Orange, and Red.  I want that to also reflect on the bar graph.  For instance, I want Blue to be at the left, then Green, then Orange, and Red.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2019 17:54:42 GMT</pubDate>
    <dc:creator>harshparikhxlrd</dc:creator>
    <dc:date>2019-12-05T17:54:42Z</dc:date>
    <item>
      <title>Changing the order that bars appear in bar graph</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Changing-the-order-that-bars-appear-in-bar-graph/m-p/501933#M32890</link>
      <description>&lt;P&gt;Hello, I am trying to see if I can change the order that the bars appear in the bar graph.  Currently, the [legend order][1] is Blue, Green, Orange, and Red.  I want that to also reflect on the bar graph.  For instance, I want Blue to be at the left, then Green, then Orange, and Red.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 17:54:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Changing-the-order-that-bars-appear-in-bar-graph/m-p/501933#M32890</guid>
      <dc:creator>harshparikhxlrd</dc:creator>
      <dc:date>2019-12-05T17:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the order that bars appear in bar graph</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Changing-the-order-that-bars-appear-in-bar-graph/m-p/501934#M32891</link>
      <description>&lt;P&gt;You control the order by adding &lt;CODE&gt;| table strr firstFieldnameHere secondFieldNameHere ...&lt;/CODE&gt; to the end.&lt;BR /&gt;
You control the color by editing the dashboard &lt;CODE&gt;XML&lt;/CODE&gt; and setting &lt;CODE&gt;charting.field*&lt;/CODE&gt; atrribute(s).  You can do it by order or by name.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 18:37:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Changing-the-order-that-bars-appear-in-bar-graph/m-p/501934#M32891</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-12-05T18:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the order that bars appear in bar graph</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Changing-the-order-that-bars-appear-in-bar-graph/m-p/501935#M32892</link>
      <description>&lt;P&gt;Thank you for helping with manipulating the order.  But, now the legend seems to be out of order.  For instance, I have blue at the left on the bar chart, but on the legend it appears at the bottom.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 18:54:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Changing-the-order-that-bars-appear-in-bar-graph/m-p/501935#M32892</guid>
      <dc:creator>harshparikhxlrd</dc:creator>
      <dc:date>2019-12-05T18:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the order that bars appear in bar graph</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Changing-the-order-that-bars-appear-in-bar-graph/m-p/501936#M32893</link>
      <description>&lt;P&gt;@harshparikhxlrd for reversing the legend order, you would need to play a bit with the CSS override, provided you have fixed series which as per your example is 4. You can refer to following answer where I have explained how to pick the CSS selector for Chart Legend: &lt;A href="https://answers.splunk.com/answers/587506/why-are-the-legend-and-stacking-order-of-this-bar.html"&gt;https://answers.splunk.com/answers/587506/why-are-the-legend-and-stacking-order-of-this-bar.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Following is the CSS you should try where &lt;CODE&gt;chart1&lt;/CODE&gt; is the id of the chart where CSS override needs to be applied i.e. &lt;CODE&gt;&amp;lt;chart id="chart1"&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;html depends="$alwaysHideCSSStyle$"&amp;gt;
     &amp;lt;style&amp;gt;
       #chart1 .highcharts-legend-item.highcharts-series-3{
         transform:translate(10px,3px) !important;
       }
       #chart1 .highcharts-legend-item.highcharts-series-2{
         transform:translate(130px,3px) !important;
       }
       #chart1 .highcharts-legend-item.highcharts-series-1{
         transform:translate(250px,3px) !important;
       }
       #chart1 .highcharts-legend-item.highcharts-series-0{
         transform:translate(360px,3px) !important;
       }          
     &amp;lt;/style&amp;gt;
   &amp;lt;/html&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is the run anywhere example to show the comparison of the two charts, First one with CSS override and second one with original Legend placement.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8050iC9DF26C7D8533EEA/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Following is the complete Simple XML Code for run anywhere example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Reverse Legend Sorting order&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html depends="$alwaysHideCSSStyle$"&amp;gt;
         &amp;lt;style&amp;gt;
           #chart1 .highcharts-legend-item.highcharts-series-3{
             transform:translate(10px,3px) !important;
           }
           #chart1 .highcharts-legend-item.highcharts-series-2{
             transform:translate(130px,3px) !important;
           }
           #chart1 .highcharts-legend-item.highcharts-series-1{
             transform:translate(250px,3px) !important;
           }
           #chart1 .highcharts-legend-item.highcharts-series-0{
             transform:translate(360px,3px) !important;
           }          
         &amp;lt;/style&amp;gt;
       &amp;lt;/html&amp;gt;
      &amp;lt;chart id="chart1"&amp;gt;
        &amp;lt;title&amp;gt;Chart with CSS override for Legend position adjustment&amp;lt;/title&amp;gt;
        &amp;lt;search id="bHostCnt"&amp;gt;
          &amp;lt;query&amp;gt;| makeresults count=9
| fields - _time
| eval counter=1
| accum counter
| eval host="host"."0".counter
| fields - counter
| eval "Start My Day"=random(), "Sales Tracker"=random(), "Queue Manager"=random(), "Reset My Call"=random() 
| foreach "Start My Day", "Sales Tracker", "Queue Manager", "Reset My Call"
    [| eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=substr('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',1,3)]
| table host *&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;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.scale"&amp;gt;inherit&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;bar&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.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="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;chart id="chart2"&amp;gt;
        &amp;lt;title&amp;gt;Chart without CSS override for Legend position adjustment&amp;lt;/title&amp;gt;
        &amp;lt;search base="bHostCnt"&amp;gt;
          &amp;lt;query&amp;gt;&amp;lt;/query&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;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.scale"&amp;gt;inherit&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;bar&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.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="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, 05 Dec 2019 19:09:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Changing-the-order-that-bars-appear-in-bar-graph/m-p/501936#M32893</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-12-05T19:09:05Z</dc:date>
    </item>
  </channel>
</rss>

