<?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: Heatmap - Custom Visualization: How can I add a drilldown? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371692#M44909</link>
    <description>&lt;P&gt;Haha - It seems there are an number of you! I'm glad to hear its moving in the right direction. I think I forgot to add the "submitted" model - which will sort of trigger the token to be used in other components (like the ones you mention). I updated the code to update both "default" and "submitted". &lt;/P&gt;

&lt;P&gt;I tested this in a dashboard where I have an input on the top for "heatmap_x" that says search when changed, and put that token into a different panel.&lt;/P&gt;

&lt;P&gt;Then, I click on the heatmap, and the token is updated, and the search is re-executed. Please let me know if this works for you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 18 Nov 2017 23:52:17 GMT</pubDate>
    <dc:creator>aljohnson_splun</dc:creator>
    <dc:date>2017-11-18T23:52:17Z</dc:date>
    <item>
      <title>Heatmap - Custom Visualization: How can I add a drilldown?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371685#M44902</link>
      <description>&lt;P&gt;Given two vectors w,v where a heatmap matrix element, the correlation coefficient corr(w,v) is calculated: How can I drilldown by clicking on the heatmap to visualize the values of w and v.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 17:29:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371685#M44902</guid>
      <dc:creator>graether</dc:creator>
      <dc:date>2017-11-15T17:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Heatmap - Custom Visualization: How can I add a drilldown?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371686#M44903</link>
      <description>&lt;P&gt;Hi @Graether - I wrote the heatmap app. There is no drill down functionality, just a mouse over information.&lt;/P&gt;

&lt;P&gt;In this example, you'll see a correlation matrix, where hovering over the cell will show the correlation value:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://preview.ibb.co/dYvRXm/Screen_Shot_2017_11_15_at_11_19_42_AM.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;However, if you are willing to add some javascript to your dashboard, this is accomplishable with the splunkjs mvc.&lt;/P&gt;

&lt;P&gt;First, add an id to the dashboard viz element...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;viz type="heatmap_app.heatmap" id='myheatmap'&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After that, add a new javascript file to &lt;CODE&gt;$SPLUNK_HOME/etc/apps/&amp;lt; whatever app you are in&amp;gt;/appserver/static&lt;/CODE&gt;, called &lt;CODE&gt;setHeatmapTokens.js&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    "jquery",
    "splunkjs/mvc",
    "splunkjs/mvc/simplexml/ready!"
], function($, mvc) {
    // Setup tokens 
    var submittedTokens = mvc.Components.get("submitted");
    var defaultTokens = mvc.Components.get("default");

    // Get the div container
    var div = $('#myheatmap')

     function setToken(name, value) {
         submittedTokens.set(name, value);
         defaultTokens.set(name, value);
     }

    // Add listener
    div.on('plotly_click', function (e, data) {
        var point = data.points[0]
        setToken('heatmap_x', point.x)
        setToken('heatmap_y', point.y)
        setToken('heatmap_z', point.z)
    })
});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Make sure to reference the javascript file in the dashboard&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard script="setHeatmapTokens.js"&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Lastly, restart splunk web or go to the _bump endpoint to load the new javascript file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&lt;A href="http://&amp;lt;your" target="test_blank"&gt;http://&amp;lt;your&lt;/A&gt; splunk url &amp;amp; port&amp;gt;/en-US/_bump
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After that, you should be able to use the &lt;CODE&gt;heatmap_x&lt;/CODE&gt;, &lt;CODE&gt;heatmap_y&lt;/CODE&gt;, and &lt;CODE&gt;heatmap_z&lt;/CODE&gt; tokens in the dashboard.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 19:21:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371686#M44903</guid>
      <dc:creator>aljohnson_splun</dc:creator>
      <dc:date>2017-11-15T19:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Heatmap - Custom Visualization: How can I add a drilldown?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371687#M44904</link>
      <description>&lt;P&gt;Hello @aljohnson_splunk,&lt;/P&gt;

&lt;P&gt;Thanks a lot for your Heatmap app, which I am using very often. I am also missing the drilldown function a lot. Is there a possibility to set on mouse click the x, y, z values (shown in the hover-baloon-text) as tokens? E.g. by the tokens.set function from the Splunk web framework in the JS-Code of your App.  By setting a three token for the X,Y,Z coordinates a drilldown can be realized and the Heatmap App become more user-friendly particular for visual analytics tasks. &lt;/P&gt;

&lt;P&gt;Can you give me a hint, where to add the token setting in your code?&lt;/P&gt;

&lt;P&gt;Best regards, Sebastian&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 15:39:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371687#M44904</guid>
      <dc:creator>sschmerl</dc:creator>
      <dc:date>2017-11-16T15:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Heatmap - Custom Visualization: How can I add a drilldown?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371688#M44905</link>
      <description>&lt;P&gt;@graether, can you check out &lt;CODE&gt;Punchcard Custom Visualization&lt;/CODE&gt; on Splunkbase?&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/3129/"&gt;https://splunkbase.splunk.com/app/3129/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 18:57:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371688#M44905</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-16T18:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Heatmap - Custom Visualization: How can I add a drilldown?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371689#M44906</link>
      <description>&lt;P&gt;Hi Sschmerl,&lt;/P&gt;

&lt;P&gt;I'm glad to hear you are using it often. I will look into adding the drilldown functionality and ping you here when / or if I can add it.&lt;/P&gt;

&lt;P&gt;To add the token setting, I'll need to add a click event listener and then set the drilldown options.&lt;BR /&gt;
See for an example &lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/AdvancedDev/CustomVizApiRef#Drilldown_options"&gt;http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/AdvancedDev/CustomVizApiRef#Drilldown_options&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;Best,&lt;BR /&gt;
Xander&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 21:03:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371689#M44906</guid>
      <dc:creator>aljohnson_splun</dc:creator>
      <dc:date>2017-11-16T21:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Heatmap - Custom Visualization: How can I add a drilldown?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371690#M44907</link>
      <description>&lt;P&gt;Hi @sschmerl - I updated my answer with a way to capture the click data. It isn't too hard. Please let me know if you have issues.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 00:55:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371690#M44907</guid>
      <dc:creator>aljohnson_splun</dc:creator>
      <dc:date>2017-11-17T00:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Heatmap - Custom Visualization: How can I add a drilldown?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371691#M44908</link>
      <description>&lt;P&gt;Hi @aljohnson_splunk,&lt;BR /&gt;
thanks for the token js provided - that works almost perfect for me.  I'm just having some issues when i want to integrate with other scripts (e.g. for buttons to reset the token, from dashboard examples app) and i have problems that my searches are not getting updated when the token changes (if i have a fieldset defined, i have the function "search on change").&lt;BR /&gt;
I'm looking for a solution to both: reseting the the token and automatic search on change. &lt;BR /&gt;
Many thanks in advance!&lt;/P&gt;

&lt;P&gt;BR Matthias&lt;/P&gt;</description>
      <pubDate>Sat, 18 Nov 2017 20:46:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371691#M44908</guid>
      <dc:creator>maada</dc:creator>
      <dc:date>2017-11-18T20:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Heatmap - Custom Visualization: How can I add a drilldown?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371692#M44909</link>
      <description>&lt;P&gt;Haha - It seems there are an number of you! I'm glad to hear its moving in the right direction. I think I forgot to add the "submitted" model - which will sort of trigger the token to be used in other components (like the ones you mention). I updated the code to update both "default" and "submitted". &lt;/P&gt;

&lt;P&gt;I tested this in a dashboard where I have an input on the top for "heatmap_x" that says search when changed, and put that token into a different panel.&lt;/P&gt;

&lt;P&gt;Then, I click on the heatmap, and the token is updated, and the search is re-executed. Please let me know if this works for you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Nov 2017 23:52:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371692#M44909</guid>
      <dc:creator>aljohnson_splun</dc:creator>
      <dc:date>2017-11-18T23:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Heatmap - Custom Visualization: How can I add a drilldown?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371693#M44910</link>
      <description>&lt;P&gt;Hi @aljohnson_splunk &lt;/P&gt;

&lt;P&gt;Is this heatmap available on Splunk version 7.1?&lt;BR /&gt;
If not, are you planning on releasing it for new versions?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Richie.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 14:43:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Heatmap-Custom-Visualization-How-can-I-add-a-drilldown/m-p/371693#M44910</guid>
      <dc:creator>richielynch89</dc:creator>
      <dc:date>2019-09-30T14:43:14Z</dc:date>
    </item>
  </channel>
</rss>

