-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Non-fancy scattergl to work with dates #1021
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
Changes from 1 commit
fac70b2
a23756d
ab4ffbf
f5d6113
3c79068
5b71b47
46a6b6c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,7 +135,7 @@ proto.handlePick = function(pickResult) { | |
|
||
// check if trace is fancy | ||
proto.isFancy = function(options) { | ||
if(this.scene.xaxis.type !== 'linear') return true; | ||
if(this.scene.xaxis.type !== 'linear' && this.scene.xaxis.type !== 'date') return true; | ||
if(this.scene.yaxis.type !== 'linear') return true; | ||
|
||
if(!options.x || !options.y) return true; | ||
|
@@ -279,7 +279,8 @@ proto.updateFast = function(options) { | |
yy = y[i]; | ||
|
||
// check for isNaN is faster but doesn't skip over nulls | ||
if(!isNumeric(xx) || !isNumeric(yy)) continue; | ||
if(!isNumeric(yy)) continue; | ||
if(!isNumeric(xx) && !(xx instanceof Date)) continue; | ||
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.
I'm afraid it will be significantly slower than 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. @etpinard @alexcjohnson I'd just like to clarify something here. Testing with 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. I'm a little surprised that epoch milliseconds are accepted as date data right now, I don't think our svg cartesian axes accept that, do they? But anyway I think your plan sounds good. 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. @alexcjohnson sorry I conflated two things in the spur of the moment, acceptance of numeric values and the rendering of dates. If I pass on epoch milliseconds it'll render fine but it won't render the numbers as dates; it'll simply show the epoch milliseconds as numbers. I'll revise my comment. |
||
|
||
idToIndex[pId++] = 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.
👍