<?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 Color Bubble Chart bubbles based the &amp;quot;size&amp;quot; field? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Color-Bubble-Chart-bubbles-based-the-quot-size-quot-field/m-p/490130#M32125</link>
    <description>&lt;P&gt;I am working from an answer at &lt;A href="https://answers.splunk.com/answers/785029/what-is-the-best-way-to-get-100ish-greeenyellowred.html:"&gt;https://answers.splunk.com/answers/785029/what-is-the-best-way-to-get-100ish-greeenyellowred.html:&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| windbag 
| head 100
| eval lenSample=len(sample) 
| stats avg(lenSample) AS lenSample BY lang
| streamstats count AS position
| eval position = position - 1
| eval y = 0 - (trunc(position/10) + 1) 
| eval x = position%10 + 1 
| eval health = case(lenSample&amp;lt;20,"Okay",lenSample&amp;lt;30,"Caution",lenSample&amp;lt;40,"Concern",lenSample&amp;gt;=0,"Critical") 
| table health x y lang
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This allows me to control the colors with &lt;CODE&gt;charting.fieldColors&lt;/CODE&gt; HOWEVER splunk expects the 4th field to be a number so the hover is displaying &lt;CODE&gt;lang: NaN&lt;/CODE&gt; for &lt;CODE&gt;Not-a-Number&lt;/CODE&gt;.  OK, so I will swap the 2 non-axis fields around by altering the last 2 lines to this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval health = case(lenSample&amp;lt;20,"1",lenSample&amp;lt;30,"2",lenSample&amp;lt;40,"3",lenSample&amp;gt;=0,"4") 
| table lang x y health
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So now the hover is perfect (except for the fact that my health is a number instead of a name but I can live with that), however I am unable to control the colors by setting them based on &lt;CODE&gt;health&lt;/CODE&gt;, because they are (by default) tied to the &lt;CODE&gt;lang&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;Regardless of the legend/search (either way is fine), how do I color the bubbles based on the &lt;CODE&gt;health&lt;/CODE&gt; value AND have a way to see the value of &lt;CODE&gt;lang&lt;/CODE&gt; (which is not, and cannot be, a number), either by hover or by legend?&lt;/P&gt;

&lt;P&gt;P.S.  I do note this documentation pages mentions that &lt;CODE&gt;charting.annotation.categoryColors&lt;/CODE&gt; can be used but it doesn't show how; perhaps that could be exploited somehow?&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartConfigurationReference#Area.2C_Bubble.2C_Bar.2C_Column.2C_Line.2C_and_Scatter_charts"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartConfigurationReference#Area.2C_Bubble.2C_Bar.2C_Column.2C_Line.2C_and_Scatter_charts&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Nov 2019 21:28:33 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-11-25T21:28:33Z</dc:date>
    <item>
      <title>Color Bubble Chart bubbles based the "size" field?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Color-Bubble-Chart-bubbles-based-the-quot-size-quot-field/m-p/490130#M32125</link>
      <description>&lt;P&gt;I am working from an answer at &lt;A href="https://answers.splunk.com/answers/785029/what-is-the-best-way-to-get-100ish-greeenyellowred.html:"&gt;https://answers.splunk.com/answers/785029/what-is-the-best-way-to-get-100ish-greeenyellowred.html:&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| windbag 
| head 100
| eval lenSample=len(sample) 
| stats avg(lenSample) AS lenSample BY lang
| streamstats count AS position
| eval position = position - 1
| eval y = 0 - (trunc(position/10) + 1) 
| eval x = position%10 + 1 
| eval health = case(lenSample&amp;lt;20,"Okay",lenSample&amp;lt;30,"Caution",lenSample&amp;lt;40,"Concern",lenSample&amp;gt;=0,"Critical") 
| table health x y lang
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This allows me to control the colors with &lt;CODE&gt;charting.fieldColors&lt;/CODE&gt; HOWEVER splunk expects the 4th field to be a number so the hover is displaying &lt;CODE&gt;lang: NaN&lt;/CODE&gt; for &lt;CODE&gt;Not-a-Number&lt;/CODE&gt;.  OK, so I will swap the 2 non-axis fields around by altering the last 2 lines to this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval health = case(lenSample&amp;lt;20,"1",lenSample&amp;lt;30,"2",lenSample&amp;lt;40,"3",lenSample&amp;gt;=0,"4") 
| table lang x y health
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So now the hover is perfect (except for the fact that my health is a number instead of a name but I can live with that), however I am unable to control the colors by setting them based on &lt;CODE&gt;health&lt;/CODE&gt;, because they are (by default) tied to the &lt;CODE&gt;lang&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;Regardless of the legend/search (either way is fine), how do I color the bubbles based on the &lt;CODE&gt;health&lt;/CODE&gt; value AND have a way to see the value of &lt;CODE&gt;lang&lt;/CODE&gt; (which is not, and cannot be, a number), either by hover or by legend?&lt;/P&gt;

&lt;P&gt;P.S.  I do note this documentation pages mentions that &lt;CODE&gt;charting.annotation.categoryColors&lt;/CODE&gt; can be used but it doesn't show how; perhaps that could be exploited somehow?&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartConfigurationReference#Area.2C_Bubble.2C_Bar.2C_Column.2C_Line.2C_and_Scatter_charts"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartConfigurationReference#Area.2C_Bubble.2C_Bar.2C_Column.2C_Line.2C_and_Scatter_charts&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 21:28:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Color-Bubble-Chart-bubbles-based-the-quot-size-quot-field/m-p/490130#M32125</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-25T21:28:33Z</dc:date>
    </item>
  </channel>
</rss>

