-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[docs] Fix multiple console.error
messages on charts
docs
#14554
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -262,6 +262,6 @@ function getGaussianSeriesData(mean, stdev = [0.5, 0.5], N = 50) { | |
Math.cos(2.0 * Math.PI * chance.floating({ min: 0, max: 0.99 })) * | ||
stdev[1] + | ||
mean[1]; | ||
return { x, y, z: x + y, id: i }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why adding the If using indexes causes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Was a quickfix for having unique ids, the index is already there, adding the mean, which is unique for every call of this function, should make the ids/keys unique overall as well. Keep in mind these are not in multiple series, they are in a single series, hence why the
Tbh I have no idea why we need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I did not see that the function was called multiple time to geenrate the data array. I thaugh it it was called once per series
For sure we could have a default id generation. The only issue is when user start to modify their data. In such case if they do not provide ids by themself, we have no way to properly define |
||
return { x, y, z: x + y, id: `${mean.join(',')}${i}` }; | ||
}); | ||
} |
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've two questions
b
at the end?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.
Probably not, we would just have to ensure the numbers don't overlap, like
1000 + v.id
I just went with the simples way of making this work,
Series B
=>{id}b
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 do not manage to reproduce the error. I reverted the change on localhost, and I see not message in the console while playing with this demo.
I assume this one can be reverted
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.
🤔 true, I suppose I got confused with the logs while doing the other scatter issue 🙃