Skip to content

Heatmap suppress hovers on missing data #4226

Description

@nicolaskruchten

A trace-by-trace flag to disable hovers on heatmaps when the z value is null/NaN

Activity

  1. emmanuelle commented on Sep 26, 2019

    @emmanuelle
    Contributor

    image
    we want the possibility to remove this hover on null/NaN regions

  2. added this to the v1.51.0 milestone on Oct 3, 2019
  3. etpinard commented on Oct 4, 2019

    @etpinard
    Contributor

    We'll need a new attribute for this - exposed in all 2d-z trace types (heatmap, contour, contourcarpet, histogram2d*, surface).

    Anyone want to take a shot at naming this new attribute? e.g. hovernanvalue or hovernan?


    In relation to #3035 and #975, maybe this new attribute could be a valType: 'string'. For example,

    hovernan: 'blank'
    // would show `z: blank` in the hover label
    
    hovernan: ''
    // or maybe handle
    hovernan: null 
    // to omit the `z: ` line in the hover label.

    Moveover, should this new attribute only affect hover labels generated via hoverinfo or should it also affect the %{z} values in hovertemplate strings. For example,

    // should
    hovernan: '',
    hovertemplate: 'f(%{x},%{y}) = %{z}'
    
    // show: `f(1,1) = NaN`
    // OR: `f(1,1) = ''` ?
  4. etpinard commented on Oct 4, 2019

    @etpinard
    Contributor

    Or wait, looks like this ticket actually wants to suppress the entire hover label (not just the z: line) when hovering over a NaN z value.

    Perhaps, in this case a boolean makes more sense: For example: hoveronnan, but maybe that's a little too hard to make up in smashtogethercase.

  5. archmoj commented on Oct 11, 2019

    @archmoj
    Contributor

    What about hovermissing?

  6. self-assigned this
    on Oct 11, 2019
  7. archmoj commented on Oct 11, 2019

    @archmoj
    Contributor

    Or hoverignore?

  8. nicolaskruchten commented on Oct 11, 2019

    @nicolaskruchten
    ContributorAuthor

    can we reuse hoveron ?

  9. nicolaskruchten commented on Oct 11, 2019

    @nicolaskruchten
    ContributorAuthor

    like hoveron = "all" | "nonnan"

  10. archmoj commented on Oct 11, 2019

    @archmoj
    Contributor

    I like it. And I see hoveron is used at least with box, parcats, scatter, scattergl, scattercarpet, scatterternary and violin.
    Is there any conflict with the traces mentioned in #4226 (comment)?

  11. archmoj commented on Oct 18, 2019

    @archmoj
    Contributor

    @emmanuelle would you mind testing the hover behaviour on missing points using this codepen?

    Updated the demo link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions