<?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 change charting.fieldColors through JS in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-charting-fieldColors-through-JS/m-p/273325#M17275</link>
    <description>&lt;P&gt;@chanmi2 it is been already 3 years but do you have any idea if you can share the solution to applying this after visualization is built?&lt;/P&gt;</description>
    <pubDate>Fri, 22 Mar 2019 12:44:56 GMT</pubDate>
    <dc:creator>seva98</dc:creator>
    <dc:date>2019-03-22T12:44:56Z</dc:date>
    <item>
      <title>How to change charting.fieldColors through JS</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-charting-fieldColors-through-JS/m-p/273322#M17272</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;Setting "charting.fieldColors" in XML always works, but it failed when I try to change this value through js.&lt;BR /&gt;
My code is like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;var chartview = mvc.Components.get("chartid");
chartview.settings.set("charting.fieldColors",'{"sth":0x65a637}');
// tried call network.render(); already
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there any way to change fieldColors through JS? Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 09:24:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-charting-fieldColors-through-JS/m-p/273322#M17272</guid>
      <dc:creator>chanmi2</dc:creator>
      <dc:date>2016-05-26T09:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to change charting.fieldColors through JS</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-charting-fieldColors-through-JS/m-p/273323#M17273</link>
      <description>&lt;P&gt;Using your example, this worked for me:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;chartview.options["charting.fieldColors"]='{"sth":0x65a637}';
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 May 2016 13:29:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-charting-fieldColors-through-JS/m-p/273323#M17273</guid>
      <dc:creator>kbarker302</dc:creator>
      <dc:date>2016-05-26T13:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to change charting.fieldColors through JS</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-charting-fieldColors-through-JS/m-p/273324#M17274</link>
      <description>&lt;P&gt;thanks @kbarker302! this is worked when the chartview.visualization is still null. Do you have any idea of applying this after visualization is built? (Again, adding network.render() does not work.)&lt;/P&gt;

&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 06:29:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-charting-fieldColors-through-JS/m-p/273324#M17274</guid>
      <dc:creator>chanmi2</dc:creator>
      <dc:date>2016-05-27T06:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to change charting.fieldColors through JS</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-charting-fieldColors-through-JS/m-p/273325#M17275</link>
      <description>&lt;P&gt;@chanmi2 it is been already 3 years but do you have any idea if you can share the solution to applying this after visualization is built?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 12:44:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-charting-fieldColors-through-JS/m-p/273325#M17275</guid>
      <dc:creator>seva98</dc:creator>
      <dc:date>2019-03-22T12:44:56Z</dc:date>
    </item>
  </channel>
</rss>

