Skip to content

Commit dff6181

Browse files
committed
Admit date X axes for fast (non-fancy) scattergl
1 parent f7a8afa commit dff6181

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/traces/scattergl/convert.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ proto.handlePick = function(pickResult) {
135135

136136
// check if trace is fancy
137137
proto.isFancy = function(options) {
138-
if(this.scene.xaxis.type !== 'linear') return true;
138+
if(this.scene.xaxis.type !== 'linear' && this.scene.xaxis.type !== 'date') return true;
139139
if(this.scene.yaxis.type !== 'linear') return true;
140140

141141
if(!options.x || !options.y) return true;
@@ -279,7 +279,8 @@ proto.updateFast = function(options) {
279279
yy = y[i];
280280

281281
// check for isNaN is faster but doesn't skip over nulls
282-
if(!isNumeric(xx) || !isNumeric(yy)) continue;
282+
if(!isNumeric(yy)) continue;
283+
if(!isNumeric(xx) && !(xx instanceof Date)) continue;
283284

284285
idToIndex[pId++] = i;
285286

0 commit comments

Comments
 (0)