Open
Conversation
|
@severinlandolt any plans of adding this into the coming releases? |
|
Any update on this PR? ANy plan to merge ? |
| if (hasCategoryValue) { | ||
| objectsWithCategories++; | ||
| } | ||
| } |
There was a problem hiding this comment.
I believe that you can write the above code (from line 29) as follows:
const objectsWithCategories = data.reduce((count, obj) =>
count + categories.flat().some(c => obj.hasOwnProperty(c) && obj[c] !== null && obj[c] !== undefined),
0
)
| if(!categories) | ||
| return 0; | ||
|
|
||
| const totalObjects = data.length + 1; |
There was a problem hiding this comment.
Could you explain why you are adding 1 here? Maybe I am missing something obvious but it looks incorrect? 🤔
|
Any plans to add this? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adding a forecast line to LineChart (and AreaChart).
New properties:
Related issue(s)
#572
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
How has This been tested?
Using StoryBook
Screenshots (if appropriate):

The PR fulfills these requirements:
mainbranch