-
Notifications
You must be signed in to change notification settings - Fork 467
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
feat: Add forecast #579
base: main
Are you sure you want to change the base?
feat: Add forecast #579
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain why you are adding 1 here? Maybe I am missing something obvious but it looks incorrect? 🤔
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:
main
branch