Skip to content

v3 - normalized option not working when dataset begins with null values #8546

Description

@benmccann

Expected Behavior

I should be able to have a dataset which skips the first points

Current Behavior

The chart is misaligned and missing the ending points when normalized: true and the dataset starts with null values

Possible Solution

The issue seems to be coming from here:

return (!isFinite(value) || !isFinite(otherValue) || otherMin > otherValue || otherMax < otherValue);

I'm not sure if we should ever be checking otherValue, but perhaps we at least don't need to check it if normalized: true?

Steps to Reproduce

https://codepen.io/benmccann/pen/KKNRVyK

If you set normalized: false the chart is drawn as expected

Context

I was trying to draw a chart and it took me awhile to figure out that might dataset wasn't missing values since the end was being cut off

Environment

  • Chart.js version: 3.0.0-beta.12
  • Browser name and version: Chrome

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions