Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeArea with null value removes fill color #3525

Closed
DennisNurtio opened this issue Nov 29, 2022 · 1 comment · Fixed by #4366 or #4369
Closed

RangeArea with null value removes fill color #3525

DennisNurtio opened this issue Nov 29, 2022 · 1 comment · Fixed by #4366 or #4369
Labels
bug Something isn't working

Comments

@DennisNurtio
Copy link

Description

When a RangeArea chart contains a null x-value, the range will no longer be filled. It does not matter if this null-x-value is part of the rangeArea series or a combined series like the line.

Steps to Reproduce

  1. Have at least one rangeArea
  2. Set one of the x-values to null

Expected Behavior

RangeArea series keeps being filled.

Actual Behavior

RangeArea series is not filled at all.

Screenshots

Without null value (OK):
image

With a null value (NOT OK):
image

Reproduction Link

Without null value (OK) : https://codepen.io/denxorz/pen/PoaBvOG
With null value (NOT OK): https://codepen.io/denxorz/pen/XWYBwex

@DennisNurtio DennisNurtio added the bug Something isn't working label Nov 29, 2022
@svgr-slth
Copy link

Experiencing a similar issue here
The series i'm comparing are being aligned on the X values (datetimes)
Everything works fine when both datasets are the same length, but if some data is missing at the end or beginning of one of the series, range areas start to look glitchy.

Example:
lets say my first series is longer than my second

// first series
[
  {
    x: "11-10-2022",
    y: [1, 3],
  },
  {
    x: "11-11-2022",
    y: [2, 4],
  },
  {
    x: "11-12-2022",
    y: [3, 5],
  }
];

// second series
[
  {
    x: "11-10-2022",
    y: [1, 3],
  },
  {
    x: "11-11-2022",
    y: [2, 4],
  }
];

Before rendering the chart, i "align my series" by filling the values with null like so:

// first series
[
  {
    x: "11-10-2022",
    y: [1, 3],
  },
  {
    x: "11-11-2022",
    y: [2, 4],
  },
  {
    x: "11-12-2022",
    y: [3, 5],
  }
];

// second series
  {
    x: "11-10-2022",
    y: [1, 3],
  },
  {
    x: "11-11-2022",
    y: [2, 4],
  },
  {
    x: "11-12-2022",
    y: [null, null],
  }
];

Here is what the chart looks like (values are not the exact same, but the use case is):
image

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