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

Handle Null Values #106

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from
Open

Handle Null Values #106

wants to merge 11 commits into from

Conversation

robcrock
Copy link
Collaborator

This is the first pass at improving how null values are handled.

Where this implementation is lacking:

  • We are not retaining the order of bars when null values are found. Instead, we are deleting the element of the array with the null, when the null was the xKey and that changes the order of the stacks.
  • This solution is also not gracefully handling nulls for our stacked charts.

However, this is still a step up, because we scatter, pie, line, bar, and area don't break when null values are referenced in the props.

@robcrock robcrock requested a review from hi2dmitri April 26, 2022 15:11
removed import ChunkGraph
@robcrock robcrock requested a review from eiozalp April 27, 2022 15:34
() => data.filter((el) => el[xKey] !== null && el[yKey] !== null),
[data]
);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of copying this in each chart, we might want to add it to a util function and import it. @robcrock

@@ -391,6 +391,7 @@ export function transformSkinnyToWide(
xDataKey: string | undefined,
yDataKey: string | undefined
) {
console.log('Function called.');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Console log @robcrock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants