<?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 shift image inside an image in Splunk on the basis of thresholds? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-shift-image-inside-an-image-in-Splunk-on-the-basis-of/m-p/327241#M11119</link>
    <description>&lt;P&gt;I would say Option 2 is quick but dirty way to do it. Ideally you should use option 1 to create your own scalable visualization based on SVG.&lt;/P&gt;

&lt;P&gt;@220757, I have updated my answer with Image Overlay Example. By the way following attachment contains Marker Gauge with Horizontal Orientation which gives similar appeal. Please try out and confirm.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://wiki.splunk.com/images/e/e5/Image_Overlay_vs_Horizontal_Marker_Gauge.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Following is Simple XML for Marker Gauge:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Using Marker Gauge with Horizontal Orientation&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search base="baseSearch"&amp;gt;
          &amp;lt;query&amp;gt;| makeresults
| eval payment_percent=55
| table payment_percent&amp;lt;query/&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;markerGauge&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.orientation"&amp;gt;x&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.rangeValues"&amp;gt;[-1,0,40,60,80,100]&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.gaugeColors"&amp;gt;["0xF3F3F3","0x008000","0xebe42d","0xf7912c","0xd13b3b"]&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 02 Nov 2017 14:30:25 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-11-02T14:30:25Z</dc:date>
    <item>
      <title>How to shift image inside an image in Splunk on the basis of thresholds?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-shift-image-inside-an-image-in-Splunk-on-the-basis-of/m-p/327236#M11114</link>
      <description>&lt;P&gt;I want to shift image according to the changing volume of payment. For instance we want to change a pointer inside a row of blocks which moves to another block according to some thresholds. &lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 10:54:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-shift-image-inside-an-image-in-Splunk-on-the-basis-of/m-p/327236#M11114</guid>
      <dc:creator>220757</dc:creator>
      <dc:date>2017-10-26T10:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to shift image inside an image in Splunk on the basis of thresholds?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-shift-image-inside-an-image-in-Splunk-on-the-basis-of/m-p/327237#M11115</link>
      <description>&lt;P&gt;@220757 can you please add mock screenshots of what you need? There could be several ways of doing it depending on what exactly you need.&lt;/P&gt;

&lt;P&gt;Following is one of the ways to perform Image Overlay with another image using CSS: &lt;A href="https://wiki.splunk.com/User_talk:Niketnilay#Topic_1:_Image_Overlay_with_Icons_Example:_Extends_Image_Ovelay_with_Single_Values_example_from_Splunk_6.x_Dashboard_Examples_Splunk_App"&gt;https://wiki.splunk.com/User_talk:Niketnilay#Topic_1:_Image_Overlay_with_Icons_Example:_Extends_Image_Ovelay_with_Single_Values_example_from_Splunk_6.x_Dashboard_Examples_Splunk_App&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 11:13:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-shift-image-inside-an-image-in-Splunk-on-the-basis-of/m-p/327237#M11115</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-26T11:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to shift image inside an image in Splunk on the basis of thresholds?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-shift-image-inside-an-image-in-Splunk-on-the-basis-of/m-p/327238#M11116</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3715i96CFC251C5B20090/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Please see mock Screen shot to navigate icon as per threshold value changes w.r.t. Time&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 12:43:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-shift-image-inside-an-image-in-Splunk-on-the-basis-of/m-p/327238#M11116</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2017-10-27T12:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to shift image inside an image in Splunk on the basis of thresholds?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-shift-image-inside-an-image-in-Splunk-on-the-basis-of/m-p/327239#M11117</link>
      <description>&lt;P&gt;&lt;STRONG&gt;[Updated Answer]&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;Added Image Overlay Example as per mock screenshot provided ( I have avoided JavaScript for Simplicity, however JavaScript will be efficient and require less coding. You can even include Canvas/SVG directly in JavaScript even id you do not want to build Custom Visualization). Also while this is a quick option for your visualization, you should actually be utilizing svg/canvas for Images/Icons using either Simple XML JavaScript Extension or else building your own Custom Visualization using Splunk Custom Visualization API as stated earlier: &lt;/P&gt;

&lt;P&gt;Following are various screenshots with test range (I have considered percent for Simplicity, you can change to actual volume)&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://wiki.splunk.com/images/0/03/Status_Indicator_With_Image_Overlay.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Following is the run anywhere Simple XML Dashboard code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Shift Image inside Base Image Overlay&amp;lt;/label&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt;| makeresults
| eval payment_percent=round($tokPaymentPercent$,0)
| table payment_percent
    &amp;lt;/query&amp;gt;
    &amp;lt;progress&amp;gt;
      &amp;lt;condition match="$result.payment_percent$&amp;amp;lt;=0"&amp;gt;
        &amp;lt;set token="tokGreyValue"&amp;gt;o&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreenValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokYellowValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokAmberValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokRedValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreyClass"&amp;gt;pointer&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreenClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokYellowClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokAmberClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokRedClass"&amp;gt;&amp;lt;/set&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;condition match="$result.payment_percent$&amp;amp;gt;0 AND $result.payment_percent$&amp;amp;lt;=40"&amp;gt;
        &amp;lt;set token="tokGreyValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreenValue"&amp;gt;&amp;amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokYellowValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokAmberValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokRedValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreyClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreenClass"&amp;gt;pointer&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokYellowClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokAmberClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokRedClass"&amp;gt;&amp;lt;/set&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;condition match="$result.payment_percent$&amp;amp;gt;40 AND $result.payment_percent$&amp;amp;lt;=60"&amp;gt;
        &amp;lt;set token="tokGreyValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreenValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokYellowValue"&amp;gt;&amp;amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokAmberValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokRedValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreyClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreenClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokYellowClass"&amp;gt;pointer&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokAmberClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokRedClass"&amp;gt;&amp;lt;/set&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;condition match="$result.payment_percent$&amp;amp;gt;60 AND $result.payment_percent$&amp;amp;lt;=80"&amp;gt;
        &amp;lt;set token="tokGreyValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreenValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokYellowValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokAmberValue"&amp;gt;&amp;amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokRedValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreyClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreenClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokYellowClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokAmberClass"&amp;gt;pointer&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokRedClass"&amp;gt;&amp;lt;/set&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;condition match="$result.payment_percent$&amp;amp;gt;80"&amp;gt;
        &amp;lt;set token="tokGreyValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreenValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokYellowValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokAmberValue"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokRedValue"&amp;gt;&amp;amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreyClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokGreenClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokYellowClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokAmberClass"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokRedClass"&amp;gt;pointer&amp;lt;/set&amp;gt;
      &amp;lt;/condition&amp;gt;
    &amp;lt;/progress&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="text" token="tokPaymentPercent" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Payment Percent (Test Data - 0 - 100)&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;0&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;html&amp;gt;
        &amp;lt;style&amp;gt;
          .payment_rangemap {
              position: relative;
              width: 500px;
              height: 150px;
          }
          #image_overlay_panel .image{
              background: transparent 50% 50% no-repeat url('/static/app/$env:app$/base_image.png');
              position:absolute;
              top: 0px;
              left: 0px;
              width: inherit;
              height: inherit;
          }
          .pointer {
              text-align: center;
              font-size: 6em;
              font-weight: bold;
              color: black;
          }
          #image_overlay_panel #grey {
             position: absolute;
             top: 40%;
             left: 30px;
          }
          #image_overlay_panel #green {
             position: absolute;
             top: 40%;
             left: 130px;
          }
          #image_overlay_panel #yellow {
             position: absolute;
             top: 40%;
             left: 230px;
          }
          #image_overlay_panel #amber {
             position: absolute;
             top: 40%;
             left: 330px;
          }
          #image_overlay_panel #red {
             position: absolute;
             top: 40%;
             left: 430px;
          }
        &amp;lt;/style&amp;gt;
        &amp;lt;div class="payment_rangemap"&amp;gt;
            &amp;lt;div class="image"/&amp;gt;
            &amp;lt;div class="singleValue $tokGreyClass$" id="grey"&amp;gt;$tokGreyValue$&amp;lt;/div&amp;gt;
            &amp;lt;div class="singleValue $tokGreenClass$" id="green"&amp;gt;$tokGreenValue$&amp;lt;/div&amp;gt;
            &amp;lt;div class="singleValue $tokYellowClass$" id="yellow"&amp;gt;$tokYellowValue$&amp;lt;/div&amp;gt;
            &amp;lt;div class="singleValue $tokAmberClass$" id="amber"&amp;gt;$tokAmberValue$&amp;lt;/div&amp;gt;
            &amp;lt;div class="singleValue $tokRedClass$" id="red"&amp;gt;$tokRedValue$&amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="rangeLegend" style="background-color:black;"&amp;gt;
          &amp;lt;h3 class="legendTitle" style="color:white;"&amp;gt;Percent Range (Legend)&amp;lt;/h3&amp;gt;
          &amp;lt;ul&amp;gt;
            &amp;lt;li style="color:grey;"&amp;gt;&amp;amp;lt;=0 : Grey&amp;lt;/li&amp;gt;
            &amp;lt;li style="color:green;"&amp;gt;1-40 : Green&amp;lt;/li&amp;gt;
            &amp;lt;li style="color:yellow;"&amp;gt;41-60 : Yellow&amp;lt;/li&amp;gt;
            &amp;lt;li style="color:orange;"&amp;gt;61-80 : Amber&amp;lt;/li&amp;gt;
            &amp;lt;li style="color:red;"&amp;gt;&amp;amp;gt;81 : Red&amp;lt;/li&amp;gt;
          &amp;lt;/ul&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The static file base image (base_image.png)  to be placed under your Splunk App's appserver/static folder (i.e. &lt;CODE&gt;$SPLUNK_HOME/etc/apps/&amp;lt;YourAppName&amp;gt;/appserver/static&lt;/CODE&gt;) is:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://wiki.splunk.com/images/4/45/Base_image.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;PS: This example uses static image file hence you might require refresh/reboot/bump of Splunk and also clearing your internet browser history.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/206320"&gt;@493669&lt;/a&gt;, are you trying to create your own visualization? &lt;/P&gt;

&lt;P&gt;Ideally you should be using &lt;CODE&gt;Marker Gauge&lt;/CODE&gt; for faster turnaround time with this requirement: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/CreateGauges#Marker_gauge" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/CreateGauges#Marker_gauge&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you are looking to come up with exact visualization like above, &lt;BR /&gt;
1) You should create your own visualization using Splunk Custom Visualization API and draw visual elements using SVG or Canvas as per your preference.&lt;BR /&gt;
2) Create an Image overlay  with base image as the boxes that you have and overlaid with pointer/s based on value. Following is my Splunk Wiki Talk link for the same topic: &lt;A href="https://wiki.splunk.com/User_talk:Niketnilay#Topic_1:_Image_Overlay_with_Icons_Example:_Extends_Image_Ovelay_with_Single_Values_example_from_Splunk_6.x_Dashboard_Examples_Splunk_App" target="_blank"&gt;https://wiki.splunk.com/User_talk:Niketnilay#Topic_1:_Image_Overlay_with_Icons_Example:_Extends_Image_Ovelay_with_Single_Values_example_from_Splunk_6.x_Dashboard_Examples_Splunk_App&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:30:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-shift-image-inside-an-image-in-Splunk-on-the-basis-of/m-p/327239#M11117</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-29T16:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to shift image inside an image in Splunk on the basis of thresholds?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-shift-image-inside-an-image-in-Splunk-on-the-basis-of/m-p/327240#M11118</link>
      <description>&lt;P&gt;Gauge will show a single value in relation to customized ranges. But i need something like above image. Apart from gauge visualisation what else can be used to show image  based on which static value field  difference is dominant.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 11:19:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-shift-image-inside-an-image-in-Splunk-on-the-basis-of/m-p/327240#M11118</guid>
      <dc:creator>220757</dc:creator>
      <dc:date>2017-11-02T11:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to shift image inside an image in Splunk on the basis of thresholds?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-shift-image-inside-an-image-in-Splunk-on-the-basis-of/m-p/327241#M11119</link>
      <description>&lt;P&gt;I would say Option 2 is quick but dirty way to do it. Ideally you should use option 1 to create your own scalable visualization based on SVG.&lt;/P&gt;

&lt;P&gt;@220757, I have updated my answer with Image Overlay Example. By the way following attachment contains Marker Gauge with Horizontal Orientation which gives similar appeal. Please try out and confirm.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://wiki.splunk.com/images/e/e5/Image_Overlay_vs_Horizontal_Marker_Gauge.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Following is Simple XML for Marker Gauge:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Using Marker Gauge with Horizontal Orientation&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search base="baseSearch"&amp;gt;
          &amp;lt;query&amp;gt;| makeresults
| eval payment_percent=55
| table payment_percent&amp;lt;query/&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;markerGauge&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.orientation"&amp;gt;x&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.rangeValues"&amp;gt;[-1,0,40,60,80,100]&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.gaugeColors"&amp;gt;["0xF3F3F3","0x008000","0xebe42d","0xf7912c","0xd13b3b"]&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Nov 2017 14:30:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-shift-image-inside-an-image-in-Splunk-on-the-basis-of/m-p/327241#M11119</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-02T14:30:25Z</dc:date>
    </item>
  </channel>
</rss>

