Skip to content

Additional line segments drawn when gaps and min/max #8902

Description

@jledentu

Hi, I've some issues when I apply min/max on X scale: on some datasets, additional line segments are drawn. I think this bug appears when there are "gaps" in the line, making the line split into several segments.

Expected Behavior

Given this chart if no min/max:

image

If I set min: 1, max: 3, I'd expect this:

image

Current Behavior

What I get:

image

Steps to Reproduce

https://codepen.io/jledentu/pen/GRrGWPg

Environment

  • Chart.js version: v3.1.0
  • Browser name and version: Firefox, 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