Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    showValueOnHover for facet charts

    Hello,

    We'd like to format the value that is displayed in charts on showValueOnHover. Or, if that is not possible, have the output of getPointHoverHTML behave the same as the value displayed on hover. Right now, the user ends up seeing two different hovers. They see one value when they hover near a data point and then a second when they hover directly over the data point. We'd like just one hover that we can format that displays when they hover near a data point and the same hover when hovering over the data point. Is that possible?

    #2
    facetChart.formatDataValue() is an override point that can be used to control how the data value appears. Will this work for you?

    Comment


      #3
      Hmm, unfortunately that API doesn't have a record parameter like getPointHoverHTML. So, we can't format the value with other properties on the record. Is it possible to add record to formatDataValue?

      Comment


        #4
        At the moment, the best way to do this would be to call getNearestDrawnValue() and grab the Record parameter from the returned DrawnValue object.

        Note that we don't guarantee that this formatter is called only during hover handling, so you should check for a null DrawnValue and have a fallback implementation that doesn't rely on the Record.

        Comment

        Working...
        X