Skip to content

[BUG] Bubble charts do not allow nulls in data values #4656

@kesmit13

Description

@kesmit13

Expected Behavior

Line and scatter charts allow you to put a null into the data point as a missing value. Bubble charts should presumably do the same.

Current Behavior

If you put a null into the data list for a bubble chart, the code will blow up in getRadius while trying to access the 'r' field of that data point.

Possible Solution

Simply check value for null before accessing the 'r' field.

Context

I have several data sets that I have to keep in sync. I do this by adding nulls in as missing values to keep the lengths of all of the data lists the same. When I have bubble chart data, this fails since I can't put nulls into the list.

Environment

  • Chart.js version: 2.6
  • Browser name and version: Safari 10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions