<?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 NeXtUI Path tooltip in Tools</title>
    <link>https://community.cisco.com/t5/tools/nextui-path-tooltip/m-p/4319895#M598</link>
    <description>&lt;P&gt;I have created paths showing bandwidth utilization based on color, but I would like to add a tooltip showing values and a link to Grafana to show timebased graphing.&amp;nbsp; I have not been able to find tooltip options for paths, only links.&amp;nbsp; Is this possible?&amp;nbsp; Would it be better to draw new links to represent bandwidth and if so, can I use the same properties for links as I did for Path?&amp;nbsp; Being:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;pathPadding&lt;/SPAN&gt;: [&lt;SPAN&gt;20&lt;/SPAN&gt;, &lt;SPAN&gt;'50%'&lt;/SPAN&gt;],&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;"arrow"&lt;/SPAN&gt;: &lt;SPAN&gt;"end"&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN&gt;"pathStyle"&lt;/SPAN&gt;: {&lt;SPAN&gt;'fill'&lt;/SPAN&gt;: &lt;SPAN&gt;bw2color&lt;/SPAN&gt;(bw_value), &lt;SPAN&gt;'stroke-width'&lt;/SPAN&gt;: &lt;SPAN&gt;'0px'&lt;/SPAN&gt;},&lt;BR /&gt;&lt;SPAN&gt;"reverse"&lt;/SPAN&gt;: reverse&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 07 Apr 2021 12:18:49 GMT</pubDate>
    <dc:creator>tjnielsetj</dc:creator>
    <dc:date>2021-04-07T12:18:49Z</dc:date>
    <item>
      <title>NeXtUI Path tooltip</title>
      <link>https://community.cisco.com/t5/tools/nextui-path-tooltip/m-p/4319895#M598</link>
      <description>&lt;P&gt;I have created paths showing bandwidth utilization based on color, but I would like to add a tooltip showing values and a link to Grafana to show timebased graphing.&amp;nbsp; I have not been able to find tooltip options for paths, only links.&amp;nbsp; Is this possible?&amp;nbsp; Would it be better to draw new links to represent bandwidth and if so, can I use the same properties for links as I did for Path?&amp;nbsp; Being:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;pathPadding&lt;/SPAN&gt;: [&lt;SPAN&gt;20&lt;/SPAN&gt;, &lt;SPAN&gt;'50%'&lt;/SPAN&gt;],&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;"arrow"&lt;/SPAN&gt;: &lt;SPAN&gt;"end"&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN&gt;"pathStyle"&lt;/SPAN&gt;: {&lt;SPAN&gt;'fill'&lt;/SPAN&gt;: &lt;SPAN&gt;bw2color&lt;/SPAN&gt;(bw_value), &lt;SPAN&gt;'stroke-width'&lt;/SPAN&gt;: &lt;SPAN&gt;'0px'&lt;/SPAN&gt;},&lt;BR /&gt;&lt;SPAN&gt;"reverse"&lt;/SPAN&gt;: reverse&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Apr 2021 12:18:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/nextui-path-tooltip/m-p/4319895#M598</guid>
      <dc:creator>tjnielsetj</dc:creator>
      <dc:date>2021-04-07T12:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: NeXtUI Path tooltip</title>
      <link>https://community.cisco.com/t5/tools/nextui-path-tooltip/m-p/4320103#M599</link>
      <description>&lt;P&gt;Hi, I solved similar problem as follows, may be it will be useful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. You can extend &lt;EM&gt;nx.graphic.Topology.Link&lt;/EM&gt; class via inheritance and add some custom properties.&lt;/P&gt;&lt;P&gt;For example &lt;EM&gt;bw&lt;/EM&gt;&amp;nbsp;and &lt;EM&gt;grafana&lt;/EM&gt;&amp;nbsp;with default value &lt;EM&gt;None&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;let ExtendedLinkConfig = {
    "properties": {
        "bw": "None",
        "grafana": "None",
    }
}
nx.define('ExtendedLink', nx.graphic.Topology.Link, ExtendedLinkConfig);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2. register them into topologyConfig&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var topologyConfig = {
  linkConfig: {
      // ...        
      bw:   'model.bw',
      grafana: 'model.grafana',
  },&lt;BR /&gt;  // New class for draw link layer
  linkInstanceClass: 'ExtendedLink',
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;3. Don't forget add new properties and your value (current bw, link to grafana graph, etc...) for them in array &lt;EM&gt;links=[]&lt;/EM&gt; for rendering topology links&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;"links": [
      {&lt;BR /&gt;          "id": 1,&lt;BR /&gt;          "source": 1,&lt;BR /&gt;          "target": 2, 
          "bw": "....",               // Your data
          "grafana": "url_to_graph",  // Your data
      },&lt;BR /&gt;     // ...
]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. Then, you can get this properties for draw path layer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// Get link obj with id 1. 
link = topology.getLink(1)

pathStyle: {
    // Set link properties for path properties
    "bw": link._bw,
    "grafana": link._grafana,
},&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that you can get this properties via mouse events on &lt;EM&gt;path layer&lt;/EM&gt; and show data like it was in php weathermap.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 18:24:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/nextui-path-tooltip/m-p/4320103#M599</guid>
      <dc:creator>Yury.Nazarov</dc:creator>
      <dc:date>2021-04-07T18:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: NeXtUI Path tooltip</title>
      <link>https://community.cisco.com/t5/tools/nextui-path-tooltip/m-p/4321701#M600</link>
      <description>&lt;P&gt;Thank you, this gets me close, I think the problem I have now is figuring out how to trigger a mouse event over a path and pass which path the mouse went over so I know which links info to display.&amp;nbsp; The API ref for path doesn't show an event like that, only dragged and moved.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 03:04:51 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/nextui-path-tooltip/m-p/4321701#M600</guid>
      <dc:creator>tjnielsetj</dc:creator>
      <dc:date>2021-04-12T03:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: NeXtUI Path tooltip</title>
      <link>https://community.cisco.com/t5/tools/nextui-path-tooltip/m-p/4388609#M602</link>
      <description>&lt;P&gt;Unfortunately I also didn't found this API docs.&lt;BR /&gt;But I catch this with jquery/js&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$(document).ready(function(){
    // Display div
    $('path').mouseover(function(event) {
        // If you put bw and grafana attribute to path level as i wrote above
        // You can catch  them from path
        url = $(this).attr('grafana');
        // Display div below mouse cursor
        $("#display_div").show().css('left',(event.pageX+10)+'px').css('top',(event.pageY+10)+'px').html("&amp;lt;img src="+url+"&amp;gt;" );
    });
    // Hide div
    $('path').mouseout(function (event) {
        $("#display_div").hide()
    });
});&lt;/PRE&gt;&lt;PRE&gt;#display_div {
        position: absolute;
        border: 1px solid #d3d3d3;
        z-index: 999999;
        display: none;
    }

&amp;lt;div id="display_div"&amp;gt;&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 20:49:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/nextui-path-tooltip/m-p/4388609#M602</guid>
      <dc:creator>Yury.Nazarov</dc:creator>
      <dc:date>2021-04-16T20:49:24Z</dc:date>
    </item>
  </channel>
</rss>

