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

Allow specifying spanGaps as number (max distance) #6993

Merged
merged 1 commit into from
Jan 21, 2020

Conversation

kurkle
Copy link
Member

@kurkle kurkle commented Jan 21, 2020

Closes: #6457

Demo

Copy link
Contributor

@benmccann benmccann left a comment

Choose a reason for hiding this comment

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

I don't really love the idea of making the line controller even more complicated, but at this point I'll probably just create the fastline chart instead of worrying about simplifying this one any more

@@ -108,14 +111,17 @@ export default DatasetController.extend({
const properties = {
x,
y,
skip: isNaN(x) || isNaN(y)
skip: isNaN(x) || isNaN(y),
stop: i > 0 && (parsed.x - prevParsed.x) > maxGapLength
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we could add skip and stop to properties only if true. I'm wondering if it would improve performance to make the object smaller

Copy link
Member Author

Choose a reason for hiding this comment

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

@etimberg etimberg merged commit 7eb0c2c into chartjs:master Jan 21, 2020
@etimberg etimberg added this to the Version 3.0 milestone Jan 21, 2020
@kurkle kurkle deleted the spangaps-num branch February 11, 2020 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Time Chart - Span Gap Improvement
3 participants