Skip to content

request: special representation for null values #2941

Closed
@RichardNeill

Description

@RichardNeill

Consider a bar chart, there is currently no way to distinguish between "this bar is zero height", and "there is no bar here". Currently, plotly does the most sensible thing it can: e.g. x=4,y=0 will be plotted (except for a bar chart where the height is invisible), whereas x=4,y=null will be ignored.

I'd like to propose an additional idea for null-handling, as a new option for the layout:
shownullmarker: true
nullmarker { symbol: 'triangle-up' }

If this is set, then

  • regardless of chart type (bar,line,bubble etc), a null value will be plotted as if it had y=0, but with the different markersymbol
  • connectgaps should still ignore nulls (this is one of the problems with casting null to zero!)
  • the tooltip should label it as "[Null]" rather than "0".
  • the symbol should default to a different color (I suggest f8f8f8 with 222222 border).
  • null points are excluded from spikelines.

Thanks very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions