<?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 Is it possible to do mouseover hint on a radio gauge in a dashboard? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-do-mouseover-hint-on-a-radio-gauge-in-a/m-p/332328#M21542</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/3731iCE0500BCC2CC918C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Oct 2017 19:02:34 GMT</pubDate>
    <dc:creator>rrameshfernando</dc:creator>
    <dc:date>2017-10-24T19:02:34Z</dc:date>
    <item>
      <title>Is it possible to do mouseover hint on a radio gauge in a dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-do-mouseover-hint-on-a-radio-gauge-in-a/m-p/332328#M21542</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/3731iCE0500BCC2CC918C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 19:02:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-do-mouseover-hint-on-a-radio-gauge-in-a/m-p/332328#M21542</guid>
      <dc:creator>rrameshfernando</dc:creator>
      <dc:date>2017-10-24T19:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to do mouseover hint on a radio gauge in a dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-do-mouseover-hint-on-a-radio-gauge-in-a/m-p/332329#M21543</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/79563"&gt;@rrameshfernando&lt;/a&gt;, refer to one of my Wiki Talk topics where I had listed out showing Static on &lt;CODE&gt;Dynamic Tooltip text on hoverig over a panel&lt;/CODE&gt;: &lt;A href="https://wiki.splunk.com/User_talk:Niketnilay#Topic_12:_Show_Tooltip_Text_on_hovering_over_Panel_.28Static.2FDynamic.29" target="_blank"&gt;https://wiki.splunk.com/User_talk:Niketnilay#Topic_12:_Show_Tooltip_Text_on_hovering_over_Panel_.28Static.2FDynamic.29&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;On Similar lines if a chart with &lt;CODE&gt;id="chart1"&lt;/CODE&gt; is created JavaScript can be used to show Tool Tip Text upon hovering over the chart. &lt;STRONG&gt;Following is a run anywhere example which displays the Dynamic Tool Tip with search results.&lt;/STRONG&gt; The search query is based on Splunk's &lt;CODE&gt;_internal&lt;/CODE&gt; index and it calculates to count of &lt;CODE&gt;Errors&lt;/CODE&gt; and &lt;CODE&gt;Warnings&lt;/CODE&gt; and calculates &lt;CODE&gt;percent&lt;/CODE&gt; based on the two counts. The Radial Gauge displays &lt;STRONG&gt;count of errors&lt;/STRONG&gt;. However, upon hovering over the chart, it displays the &lt;STRONG&gt;percent of Errors compared to Warnings&lt;/STRONG&gt; as &lt;CODE&gt;dynamic Tool Tip&lt;/CODE&gt; using &lt;CODE&gt;token&lt;/CODE&gt; &lt;CODE&gt;set&lt;/CODE&gt; inside the &lt;CODE&gt;&amp;lt;done&amp;gt;&lt;/CODE&gt; &lt;STRONG&gt;Search Event Handler&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/218584-splunkcharttooltip.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Following is the Simple XML Dashboard Source:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form script="radial_gauge_tooltip_on_mousehover.js"&amp;gt;
  &amp;lt;label&amp;gt;Radial Gauge Hover Tooltip&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;&amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;input type="time" token="tokTime" searchWhenChanged="true"&amp;gt;
        &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
        &amp;lt;default&amp;gt;
          &amp;lt;earliest&amp;gt;@d&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;html id="htmlToolTip1" depends="$tokShowChart1ToolTip$"&amp;gt;
          &amp;lt;!-- Style for Tooltip Text for center alignment with panel --&amp;gt;
          &amp;lt;style&amp;gt;
            #htmlToolTip1{
              margin:auto !important;
              width: 20% !important;
            }
          &amp;lt;/style&amp;gt;
          &amp;lt;div class="tooltip fade top in"&amp;gt;
            &amp;lt;div class="tooltip-arrow"/&amp;gt;
            &amp;lt;div class="tooltip-inner"&amp;gt;$tokToolTipText1$&amp;lt;/div&amp;gt;
          &amp;lt;/div&amp;gt;
      &amp;lt;/html&amp;gt;
      &amp;lt;chart id="chart1"&amp;gt;
        &amp;lt;title&amp;gt;Splunkd log Errors&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype=splunkd log_level=*
|  stats count(eval(log_level="WARN")) as Warning count(eval(log_level="ERROR")) as Error
|  eval percent=round((Error/Warning)*100,2)
|  eval percent=if(Warning=0,0,percent)&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$tokTime.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$tokTime.latest$&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
          &amp;lt;done&amp;gt;
            &amp;lt;set token="tokToolTipText1"&amp;gt;Tooltip: Error/Warning Ratio is  $result.percent$ %&amp;lt;/set&amp;gt;
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&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.abbreviation"&amp;gt;none&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.abbreviation"&amp;gt;none&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.abbreviation"&amp;gt;none&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"&amp;gt;radialGauge&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.rangeValues"&amp;gt;[0,20,60,100]&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;all&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.gaugeColors"&amp;gt;["0x84E900","0xFFE800","0xBF3030"]&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.mode"&amp;gt;standard&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.placement"&amp;gt;right&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.lineWidth"&amp;gt;2&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.enabled"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.scales.shared"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.size"&amp;gt;medium&amp;lt;/option&amp;gt;
      &amp;lt;/chart&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;Following is the JavaScript code for &lt;CODE&gt;radial_gauge_tooltip_on_mousehover.js&lt;/CODE&gt; included in above dashboard:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require(["splunkjs/mvc", 
        "splunkjs/mvc/tokenutils", 
        "jquery", 
        "splunkjs/ready!", 
        "splunkjs/mvc/simplexml/ready!" 
    ], function( mvc, 
    TokenUtils, 
    $){ 
        //jQuery to access Chart with ID and use mvc.Components.get() function to get all Submitted Tokens. 
        //On mouseover() event set the show token for the Tooltip 
        $('#chart1').on("mouseover",function(){ 
            var tokens = mvc.Components.get("submitted");
            tokens.set("tokShowChart1ToolTip", "true");
        }); 

        //On mouseout() event unset the show token for the Tooltip to hide the same. 
        $('#chart1').on("mouseout",function(){ 
            var tokens = mvc.Components.get("submitted");
            tokens.unset("tokShowChart1ToolTip"); 
        }); 
    });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: &lt;BR /&gt;
-  The JavaScript file radial_gauge_tooltip_on_mousehover.js needs to be placed under your Splunk App's Static folder i.e. &lt;CODE&gt;$SPLUNK_HOME/etc/apps/&amp;lt;YourSplunkAppName&amp;gt;/appserver/static&lt;/CODE&gt; &lt;BR /&gt;
-  Since this example requires Simple XML JavaScript Extension with JS static file, it might require Splunk refresh/bump or reboot. Also internet browser history cleanup for the changes to work.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:24:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-do-mouseover-hint-on-a-radio-gauge-in-a/m-p/332329#M21543</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-29T16:24:49Z</dc:date>
    </item>
  </channel>
</rss>

