<?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: image overlay with single value panel changing in color in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428766#M28235</link>
    <description>&lt;P&gt;@mdmaala while posting code on &lt;CODE&gt;Splunk Answers use the Code Button (101010 or shortcut Ctrl+K)&lt;/CODE&gt; so that special characters do not escape.&lt;/P&gt;

&lt;P&gt;A screenshot of what you currently have and what you expect would also help. Please mock/anonymize and sensitive information in your code/data shared.&lt;/P&gt;</description>
    <pubDate>Mon, 29 Apr 2019 12:46:18 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2019-04-29T12:46:18Z</dc:date>
    <item>
      <title>image overlay with single value panel changing in color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428765#M28234</link>
      <description>&lt;P&gt;hi! I've seen @niketnilay 's example of image overlay with single values, and I tried applying it on my own usecase. Successfully I was able to put put my own image and single value panel, however, what I want is for the panels to change based on my set conditions, but when I applied it the colors are not changing bit the it displays the correct value. below is my xml code:&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 08:32:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428765#M28234</guid>
      <dc:creator>mdmaala</dc:creator>
      <dc:date>2019-04-29T08:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: image overlay with single value panel changing in color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428766#M28235</link>
      <description>&lt;P&gt;@mdmaala while posting code on &lt;CODE&gt;Splunk Answers use the Code Button (101010 or shortcut Ctrl+K)&lt;/CODE&gt; so that special characters do not escape.&lt;/P&gt;

&lt;P&gt;A screenshot of what you currently have and what you expect would also help. Please mock/anonymize and sensitive information in your code/data shared.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 12:46:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428766#M28235</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-04-29T12:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: image overlay with single value panel changing in color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428767#M28236</link>
      <description>&lt;P&gt;hi at @niketnilay sure I will repost my code here. however I will not be able to post a screenshot of my codes, since I do not have enough points.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 16:53:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428767#M28236</guid>
      <dc:creator>mdmaala</dc:creator>
      <dc:date>2019-04-29T16:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: image overlay with single value panel changing in color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428768#M28237</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard stylesheet="overlay.css"&amp;gt;
 &amp;lt;label&amp;gt;Machines&amp;lt;/label&amp;gt;
&amp;lt;fieldset autoRun="true" submitButton="false"&amp;gt;
   &amp;lt;input type="time" searchWhenChanged="true"&amp;gt;
     &amp;lt;default&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;/default&amp;gt;
   &amp;lt;/input&amp;gt;
 &amp;lt;/fieldset&amp;gt;
 &amp;lt;row&amp;gt;
     &amp;lt;panel id="image_overlay_panel"&amp;gt;
         &amp;lt;search id="M1"&amp;gt;
             &amp;lt;query&amp;gt;|savedsearch rename1  
|sort 1 -_time Machine1 
|streamstats window=1 current=f last(_time) as prevTime last(Green) as RUN last(Yellow) as IDLE last(Red) as STOP by Username
|eval clock = time()
|eval rDUR = round((clock-_time)/60)
|eval RunTime = case(Green=1,rDUR,Yellow=1,rDUR,Red=1,rDUR,1=1,0)
|eval range= case(Green=1,"low", Yellow=1,"elevated", Red=1,"severe")
|table RunTime range&amp;lt;/query&amp;gt;
             &amp;lt;earliest&amp;gt;$earliest$&amp;lt;/earliest&amp;gt;
             &amp;lt;latest&amp;gt;$latest$&amp;lt;/latest&amp;gt;
             &amp;lt;progress&amp;gt;
               &amp;lt;set token="M1"&amp;gt;$result.RunTime$&amp;lt;/set&amp;gt;
             &amp;lt;/progress&amp;gt;
         &amp;lt;/search&amp;gt;
         &amp;lt;search id="M2"&amp;gt;
             &amp;lt;query&amp;gt;|savedsearch rename2  
|sort 1 -_time Machine1 
|streamstats window=1 current=f last(_time) as prevTime last(Green) as RUN last(Yellow) as IDLE last(Red) as STOP by Username
|eval clock = time()
|eval rDUR = round((clock-_time)/60)
|eval RunTime = case(Green=1,rDUR,Yellow=1,rDUR,Red=1,rDUR,1=1,0)
|eval range= case(Green=1,"low", Yellow=1,"elevated", Red=1,"severe")
|table RunTime range&amp;lt;/query&amp;gt;
             &amp;lt;earliest&amp;gt;$earliest$&amp;lt;/earliest&amp;gt;
             &amp;lt;latest&amp;gt;$latest$&amp;lt;/latest&amp;gt;
             &amp;lt;progress&amp;gt;
               &amp;lt;set token="M2"&amp;gt;$result.RunTime$&amp;lt;/set&amp;gt;
             &amp;lt;/progress&amp;gt;
         &amp;lt;/search&amp;gt;
         &amp;lt;html&amp;gt;
             &amp;lt;div class="ingestion_pipeline"&amp;gt;
                 &amp;lt;div class="image"&amp;gt;&amp;lt;/div&amp;gt;
                 &amp;lt;div class="singleValue" id="M1"&amp;gt;$M1$&amp;lt;/div&amp;gt;
                 &amp;lt;div class="singleValue" id="M2"&amp;gt;$M2$&amp;lt;/div&amp;gt;
             &amp;lt;/div&amp;gt;
         &amp;lt;/html&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>Mon, 29 Apr 2019 17:03:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428768#M28237</guid>
      <dc:creator>mdmaala</dc:creator>
      <dc:date>2019-04-29T17:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: image overlay with single value panel changing in color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428769#M28238</link>
      <description>&lt;P&gt;I now posted below my xml code&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 17:04:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428769#M28238</guid>
      <dc:creator>mdmaala</dc:creator>
      <dc:date>2019-04-29T17:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: image overlay with single value panel changing in color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428770#M28239</link>
      <description>&lt;P&gt;@mdmaala you can always post the image on any image sharing site like &lt;CODE&gt;imgur&lt;/CODE&gt; and then use the &lt;CODE&gt;Image button &amp;lt;img&amp;gt; or shortcut Ctrl+G&lt;/CODE&gt; to post the image using the image URL. Ensure that you mask/anonymize any sensitive information before posting the same.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 17:15:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428770#M28239</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-04-29T17:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: image overlay with single value panel changing in color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428771#M28240</link>
      <description>&lt;P&gt;Converted code to comment so that question is not marked as answered.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 17:17:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428771#M28240</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-04-29T17:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: image overlay with single value panel changing in color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428772#M28241</link>
      <description>&lt;P&gt;@mdmaala I am taking first query as an example. Does not seem like you are using any existing field or token from search which can be used as color for visualization. So you need to create the same first.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;          &amp;lt;search id="M1"&amp;gt;
              &amp;lt;query&amp;gt;|savedsearch rename1  
 |sort 1 -_time Machine1 
 |streamstats window=1 current=f last(_time) as prevTime last(Green) as RUN last(Yellow) as IDLE last(Red) as STOP by Username
 |eval clock = time()
 |eval rDUR = round((clock-_time)/60)
 |eval RunTime = case(Green=1,rDUR,Yellow=1,rDUR,Red=1,rDUR,1=1,0)
 |eval range= case(Green=1,"low", Yellow=1,"elevated", Red=1,"severe"),
           color= case(Green=1,"green", Yellow=1,"yellow", Red=1,"red"),
 |table RunTime range color&amp;lt;/query&amp;gt;
              &amp;lt;earliest&amp;gt;$earliest$&amp;lt;/earliest&amp;gt;
              &amp;lt;latest&amp;gt;$latest$&amp;lt;/latest&amp;gt;
              &amp;lt;progress&amp;gt;
                &amp;lt;set token="M1"&amp;gt;$result.RunTime$&amp;lt;/set&amp;gt;
                &amp;lt;set token="M1Color"&amp;gt;$result.color$&amp;lt;/set&amp;gt;
              &amp;lt;/progress&amp;gt;
          &amp;lt;/search&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;On similar lines change &lt;CODE&gt;M2 search&lt;/CODE&gt; and create token &lt;CODE&gt;M2Color&lt;/CODE&gt;.&lt;BR /&gt;
Finally set the color in the HTML div using &lt;CODE&gt;background&lt;/CODE&gt; color for font &lt;CODE&gt;color&lt;/CODE&gt;. I have listed examples of each of these below. Use as per your need.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;              &amp;lt;div class="singleValue" style="background:$M1Color$;color:white;" id="M1"&amp;gt;$M1$&amp;lt;/div&amp;gt;
              &amp;lt;div class="singleValue" style="color:$M2Color$" id="M2"&amp;gt;$M2$&amp;lt;/div&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Apr 2019 17:24:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428772#M28241</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-04-29T17:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: image overlay with single value panel changing in color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428773#M28242</link>
      <description>&lt;P&gt;thank you so much @niketnilay ! i think this already works for me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 18:03:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428773#M28242</guid>
      <dc:creator>mdmaala</dc:creator>
      <dc:date>2019-04-29T18:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: image overlay with single value panel changing in color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428774#M28243</link>
      <description>&lt;P&gt;i'll take note of this for the next time! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 18:04:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428774#M28243</guid>
      <dc:creator>mdmaala</dc:creator>
      <dc:date>2019-04-29T18:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: image overlay with single value panel changing in color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428775#M28244</link>
      <description>&lt;P&gt;Awesome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Yay!!!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 06:42:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/image-overlay-with-single-value-panel-changing-in-color/m-p/428775#M28244</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-04-30T06:42:23Z</dc:date>
    </item>
  </channel>
</rss>

