Hide value from tool-tip

Answered

Comments

4 comments

  • Avatar
    Moti Granovsky (Edited )

    Hi,

    The lat/long are displayed because they are the marker's name - when a textual field is used (such as a country field) - that would be displayed in place of lat/long.

    There are two possible ways of achieving this:

    1. By clearing the value of the marker name
    2. By providing a custom HTML template without it

    In both cases, you would start with the widget event "beforedatapointtooltip" as described in the Sisense Javascript API Reference

    widget.on("beforedatapointtooltip", (event, params) => {
    // params contains: widget, context, template, cancel
    });

    For approach #1 you can set the marker name to nothing:

    params.context.marker.name = "";

    For approach #2 find the original template in the path:

    C:\Program Files\Sisense\PrismWeb\client\views\scattermap\scattermap-tooltip.html

    Then copy it into a plugin, edit to remove the HTML element referring to the "marker.name" property, and then change the "template" to point to your custom template:

    params.template = '<div data-ng-include="../plugins/myCustomTemplatePlugin/custom-scattermap-tooltip.html"></div>';

    You could also simply paste the HTML itself as the "template" but that approach is less maintainable in the long run, so using a template file is preferable.

    1
    Comment actions Permalink
  • Avatar
    clickdashboard

    Thank you! Approach #1 worked beautifully! 

    1
    Comment actions Permalink
  • Avatar
    Robert Choquette

    Approach #1 seems to work for a single point.  When there are multiple points, then one is modified but the others are untouched.  Any ideas how to iterate through all the points?

    0
    Comment actions Permalink
  • Avatar
    Expand Dev

    Hi,

     

    This works well for the map, but it doesn't seem to work for the date heatmap. 

    Is there another event I should be using?

     

    Thanks, James

    0
    Comment actions Permalink

Please sign in to leave a comment.