<?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: Why is &amp;quot;charting.fieldColors&amp;quot; not working? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356014#M105342</link>
    <description>&lt;P&gt;Have you tried something like following?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.fieldColors"&amp;gt;{"td_cnt":0x9BE8AB, "fd_count ":0xE87D6F,"Total":0xFF0000}&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 11 Aug 2017 01:39:26 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-08-11T01:39:26Z</dc:date>
    <item>
      <title>Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356005#M105333</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;

&lt;P&gt;I'm in a pickle here...  I've been trying to get the following "charting.fieldColors" changed but for some reason, it isn't working.  Greatly appreciate the second set of eyes.  I've tried using single quotes and HEX as well but still can't seem to get to change.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&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;collapsed&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY.visibility"&amp;gt;collapsed&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.scale"&amp;gt;linear&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.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;default&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.fieldColors"&amp;gt;{"Success":9BE8AB, "Error":E87D6F}&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;all&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.placement"&amp;gt;none&amp;lt;/option&amp;gt;            
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2017 07:37:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356005#M105333</guid>
      <dc:creator>leomedina</dc:creator>
      <dc:date>2017-04-29T07:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356006#M105334</link>
      <description>&lt;P&gt;@leomedina.... you are missing &lt;CODE&gt;0x&lt;/CODE&gt; before the hex color codes&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;option name="charting.fieldColors"&amp;gt;{"Success":0x9BE8AB, "Error":0xE87D6F}&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can explore &lt;CODE&gt;seriesColors&lt;/CODE&gt; as alternative to fieldColors if you do not want to use the names of the fields. This is more like coloring the series based on sequence i.e. first series will get 0x9BE8AB and second 0xE87D6F. If you have more than two series and only two colors defined in seriesColors then third series will pick 0x9BE8AB and so on.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;option name="charting.seriesColors"&amp;gt;[0x9BE8AB, 0xE87D6F]&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 29 Apr 2017 09:03:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356006#M105334</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-04-29T09:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356007#M105335</link>
      <description>&lt;P&gt;I gave with 0x but still it is not coming up. The bar chart in my case is horizontal display as opposed to vertical ones&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2017 07:51:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356007#M105335</guid>
      <dc:creator>lakshmisri</dc:creator>
      <dc:date>2017-08-09T07:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356008#M105336</link>
      <description>&lt;P&gt;@lakshmisri, so what I understand is that you are using Bar Chart and not Column chart.&lt;BR /&gt;
The Simple XML Configuration charting.fieldColors or charting.seriesColors should be applicable to Bar Chart as well. Make sure field names used in chart configuration are the same as field in the Splunk search.&lt;/P&gt;

&lt;P&gt;Refer to following documentation for the same. You can see that field name is all upper case in the search (see Legends i.e. ERROR etc.) as well as chart configuration.&lt;/P&gt;

&lt;P&gt;Also refer to Chart Configuration reference, for some special characters in the field names that need to be escaped.&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartConfigurationReference#General_chart_properties"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartConfigurationReference#General_chart_properties&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Can you give your current search query or field name? Also have you tried with seriesColors option, whether that would work for your use case.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2017 10:24:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356008#M105336</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-09T10:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356009#M105337</link>
      <description>&lt;P&gt;| stats sum(td_cnt) as td_count, sum(fd_count) as fd_count by category | eval Total = td_cnt+ fd_count| sort category | table category Total |eval Total = round(Total/1000, 0)&lt;/P&gt;

&lt;P&gt;Basically if i apply for total it is working but for every category am trying to get a color&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:16:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356009#M105337</guid>
      <dc:creator>lakshmisri</dc:creator>
      <dc:date>2020-09-29T15:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356010#M105338</link>
      <description>&lt;P&gt;I hope you understand the difference between fieldColors and seriesColors.&lt;/P&gt;

&lt;P&gt;If you split by category you will have to know each field name to apply the fieldColor (you can check out what legend is displayed to come up with Field Names for fieldColor).&lt;/P&gt;

&lt;P&gt;If there are two many fields or you do not have fixed field names you should better use seriesColors.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2017 15:55:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356010#M105338</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-09T15:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356011#M105339</link>
      <description>&lt;P&gt;I tried both of these. It is just taking the standard color and not getting applied. Hence not sure how to address it.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2017 17:20:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356011#M105339</guid>
      <dc:creator>lakshmisri</dc:creator>
      <dc:date>2017-08-09T17:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356012#M105340</link>
      <description>&lt;P&gt;Based on the details so far, your field names are &lt;STRONG&gt;td_cnt&lt;/STRONG&gt;, &lt;STRONG&gt;fd_count&lt;/STRONG&gt; and &lt;STRONG&gt;Total&lt;/STRONG&gt;. Is this correct?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 02:12:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356012#M105340</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-10T02:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356013#M105341</link>
      <description>&lt;P&gt;Yes finally am showing the Total by Category. So I need to apply the color for the Category&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 05:52:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356013#M105341</guid>
      <dc:creator>lakshmisri</dc:creator>
      <dc:date>2017-08-10T05:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356014#M105342</link>
      <description>&lt;P&gt;Have you tried something like following?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.fieldColors"&amp;gt;{"td_cnt":0x9BE8AB, "fd_count ":0xE87D6F,"Total":0xFF0000}&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Aug 2017 01:39:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356014#M105342</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-11T01:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356015#M105343</link>
      <description>&lt;P&gt;I want or the values for the category&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 04:54:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356015#M105343</guid>
      <dc:creator>lakshmisri</dc:creator>
      <dc:date>2017-08-11T04:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356016#M105344</link>
      <description>&lt;P&gt;I am not grasping your request. Do you have fixed field names or not? Can you paste sample output of your query?&lt;/P&gt;

&lt;P&gt;In case you do not know your field names your only option would be to use seriesColors instead.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.seriesColors"&amp;gt;[0x9BE8AB, 0xE87D6F,0xFF0000}&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Aug 2017 11:45:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356016#M105344</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-11T11:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356017#M105345</link>
      <description>&lt;P&gt;I have the same problem. Suppose I pass my data through stats into the bar/column chart, e.g. :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;stats avg(Duration) as AvgDuration by Method
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I expected colors to be applied based on each Method that gets charted out, e.g. "Method1", "Method2", but instead it applies just one color for the field (AvgDuration).&lt;/P&gt;

&lt;P&gt;Pie charts work as expected, so it seems like a bug/feature of bar &amp;amp; column charts.&lt;/P&gt;

&lt;P&gt;I suspect it's a feature (rather than a bug). Unlike pie charts, which work on a single field, bar charts can work on multiple fields. For example if my stats command was:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;stats avg(Duration) as AvgDuration, min(Duration) as MinDuration by Method
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My bar chart would have an AvgDuration and MinDuration bar for both "Method1" and "Method2", and it aligns the colors along the field names (AvgDuartion and MinDuration) rather than the series names ("Method1", "Method2").&lt;/P&gt;

&lt;P&gt;Is there a way to tell the bar chart to color the series names instead of the field names? Or a way to put the bar chart in single-field mode?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Oct 2018 05:53:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356017#M105345</guid>
      <dc:creator>bjo</dc:creator>
      <dc:date>2018-10-02T05:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356018#M105346</link>
      <description>&lt;P&gt;@bjo this is not a bug with Splunk. For the first query when you plot  &lt;CODE&gt;AvgDuration&lt;/CODE&gt; your field name is AvgDuration and its values are average for Method1, Method2 etc.&lt;/P&gt;

&lt;P&gt;One of the options would be to use transpose.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;yourSearch&amp;gt;
| stats avg(Duration) as AvgDuration by Method
|  transpose 0 header_field="Method" column_name="Method"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Similarly,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;yourSearch&amp;gt;
| stats avg(Duration) as AvgDuration, min(Duration) as MinDuration  by Method
| transpose 0 header_field="Method" column_name="Method"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: One of recent answers on similar lines: &lt;A href="https://answers.splunk.com/answers/689833/how-do-you-customize-colors-in-a-bar-chart.html#answer-689004"&gt;https://answers.splunk.com/answers/689833/how-do-you-customize-colors-in-a-bar-chart.html#answer-689004&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Alternatively if you are on &lt;CODE&gt;Splunk 6.6 or Higher&lt;/CODE&gt; you can also try out the &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Viz/VisualizationTrellis"&gt;Trellis Visualization Layout&lt;/A&gt; which should give more control to Split Charts based on field of your interest and hence will apply color accordingly.&lt;/P&gt;

&lt;P&gt;Please try out and confirm and do up-vote it this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Oct 2018 17:08:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356018#M105346</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-10-02T17:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356019#M105347</link>
      <description>&lt;P&gt;Indeed, I agree it is a feature, and I was able to transpose everything to get it to work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;transpose 0 header_field="Method"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Oct 2018 18:31:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/356019#M105347</guid>
      <dc:creator>bjo</dc:creator>
      <dc:date>2018-10-02T18:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "charting.fieldColors" not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/641389#M222218</link>
      <description>&lt;P&gt;A good solution for the issue. Ignore the typo.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 07:10:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-quot-charting-fieldColors-quot-not-working/m-p/641389#M222218</guid>
      <dc:creator>MinboChung</dc:creator>
      <dc:date>2023-04-26T07:10:30Z</dc:date>
    </item>
  </channel>
</rss>

