Skip to content

Tooltip text not working when text is 0 (number) #2660

Closed
@stillesjo

Description

@stillesjo

Example that displays the error

I want to be able to get a value from the text property in the data object. I noticed that if the value is the number 0 it won't be displayed in the plot.

          text: [0, 0, 0, 0, 0],
          hoverinfo: "x+text+name",

The code above will make the tooltip only show x and name. The text property won't be visible.
image

All other values except 0 will render properly, as can be seen in the code example linked above. Also if all the numbers are strings they will be shown correctly.

I guess that there is a null-check somewhere that treats 0 as false and therefore won't add it to the tooltip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions