<?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: Scatter plot color assignment in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-plot-color-assignment/m-p/368702#M24084</link>
    <description>&lt;P&gt;If you are currently seeing only one color(blue) this implies you have only one series. You need to provide that series name as it appears in the legend of scatter chart to charting.fieldColors configuration. Also it seems your scatter plot query is not generating three ranges at all otherwise you would have seen three colors. If following is the final query for your scatter plot, please make sure certainty is on x-axis, threat is on y-axis and range is plotted on the graph.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| table range, certainty, threat
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternatively, as I had mentioned, instead of fieldColors you can use seriesColors.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.seriesColors"&amp;gt;[0xff0000,0xffff00,0xFF4500]&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, I feel you should check your query and make sure the scatter chart is being populated correctly before you think about changing colors. (Refer to Splunk documentation on Scatter Chart: &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Viz/ScatterChart"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Viz/ScatterChart&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;I am converting my answer to a comment so that until your issue is resolved, this flags for others to answer as well.&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2017 02:00:25 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-05-10T02:00:25Z</dc:date>
    <item>
      <title>Scatter plot color assignment</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-plot-color-assignment/m-p/368699#M24081</link>
      <description>&lt;P&gt;I have a scatter plot  that I am trying to assign colors to based on where the fall. As a example, I am plotting some points based on threat and certainty scores. I would like to be able to assign colors based on the following:&lt;/P&gt;

&lt;P&gt;threat &amp;gt;50 certanty &amp;gt;50 = Red&lt;BR /&gt;
threat &amp;gt;50 certainty&amp;lt;50 = Orange&lt;BR /&gt;
threat&amp;lt;50 certainty&amp;gt;50 = Yellow&lt;/P&gt;

&lt;P&gt;I have found some information on changing colors for line graphs, but have not found anything on scatter plots. I have tried using some of this logic without any luck.&lt;/P&gt;

&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 22:02:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-plot-color-assignment/m-p/368699#M24081</guid>
      <dc:creator>vectra_tme</dc:creator>
      <dc:date>2017-05-08T22:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot color assignment</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-plot-color-assignment/m-p/368700#M24082</link>
      <description>&lt;P&gt;1) Unless you have already created Rages as per your requirement try the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval range= case(threat &amp;gt;50 AND certainty&amp;gt;50, Red, threat &amp;gt;50 AND certainty&amp;lt;50,Orange, true(), Yellow)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2) Option (i) If you know the Series Names use can use chating.fieldColors&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.fieldColors"&amp;gt;{"Red":0xff0000,"Yellow":0xffff00,"Orange":0xFF4500}&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Option (ii) If you dont know the series names you can use charting.seriesColors&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.seriesColors"&amp;gt;[0xff0000,0xffff00,0xFF4500]&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartConfigurationReference#General_chart_properties"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartConfigurationReference#General_chart_properties&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2017 07:50:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-plot-color-assignment/m-p/368700#M24082</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-05-09T07:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot color assignment</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-plot-color-assignment/m-p/368701#M24083</link>
      <description>&lt;P&gt;Based on what you provided, I have come up with the following but am still getting blue dots throughout the scatter plot&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;panel&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=* sourcetype=Vectra-CEF signature="hsc" $search$  | dedup src | search $hostseverity$  | table certainty,threat | eval range= case(threat &amp;amp;gt;=50 AND certainty &amp;amp;gt;=50, Red, threat &amp;amp;gt;=50 AND certainty &amp;amp;lt;50, Orange, threat &amp;amp;lt;50 AND certainty &amp;amp;gt;=50, Yellow, true(), Black)&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$time.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$time.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;scatter&amp;lt;/option&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.maximumNumber"&amp;gt;100&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisX.minimumNumber"&amp;gt;0&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.maximumNumber"&amp;gt;100&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY.minimumNumber"&amp;gt;0&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.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.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.placement"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.fieldColors"&amp;gt;{"Red":0xff0000,"Orange":0xFF4500,"Yellow":0xffff00,"Black":0x000000}&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 May 2017 22:32:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-plot-color-assignment/m-p/368701#M24083</guid>
      <dc:creator>vectra_tme</dc:creator>
      <dc:date>2017-05-09T22:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot color assignment</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-plot-color-assignment/m-p/368702#M24084</link>
      <description>&lt;P&gt;If you are currently seeing only one color(blue) this implies you have only one series. You need to provide that series name as it appears in the legend of scatter chart to charting.fieldColors configuration. Also it seems your scatter plot query is not generating three ranges at all otherwise you would have seen three colors. If following is the final query for your scatter plot, please make sure certainty is on x-axis, threat is on y-axis and range is plotted on the graph.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| table range, certainty, threat
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternatively, as I had mentioned, instead of fieldColors you can use seriesColors.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.seriesColors"&amp;gt;[0xff0000,0xffff00,0xFF4500]&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, I feel you should check your query and make sure the scatter chart is being populated correctly before you think about changing colors. (Refer to Splunk documentation on Scatter Chart: &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Viz/ScatterChart"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Viz/ScatterChart&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;I am converting my answer to a comment so that until your issue is resolved, this flags for others to answer as well.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 02:00:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-plot-color-assignment/m-p/368702#M24084</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-05-10T02:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot color assignment</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-plot-color-assignment/m-p/368703#M24085</link>
      <description>&lt;P&gt;You are correct, the range was not being generated. A simple fix of adding quotes, resolved the issue. Here is code that fixed my issue: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;query&amp;gt;index=* sourcetype=Vectra-CEF signature="hsc" *  | dedup src | search threat&amp;gt;0 AND certainty&amp;gt;0  | eval status= case(threat&amp;gt;=50 AND certainty&amp;gt;=50, "Critical", threat&amp;gt;=50 AND certainty&amp;lt;50, "High", threat&amp;lt;50 AND certainty&amp;gt;=50, "Medium", true(), "Low") | table status, certainty, threat&amp;lt;/query&amp;gt;

&amp;lt;option name="charting.fieldColors"&amp;gt;{"Critical":0xbe1e2d,"High":0xf05a28,"Medium":0xfaaf40,"Low":0x4e6875}&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks for all of your help. Greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 18:09:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-plot-color-assignment/m-p/368703#M24085</guid>
      <dc:creator>vectra_tme</dc:creator>
      <dc:date>2017-05-10T18:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot color assignment</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-plot-color-assignment/m-p/368704#M24086</link>
      <description>&lt;P&gt;@vectra_tme - Glad you were able to find the solution with niketnilay's help. Please don't forget to click "Accept" to resolve your question and upvote any comments that were especially helpful. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 18:27:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-plot-color-assignment/m-p/368704#M24086</guid>
      <dc:creator>aaraneta_splunk</dc:creator>
      <dc:date>2017-05-10T18:27:08Z</dc:date>
    </item>
  </channel>
</rss>

