Skip to content

Commit b5cd573

Browse files
committed
replace false values with BADNUM in empty calcdata traces
1 parent 5c2393a commit b5cd573

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plots/plots.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ var Plotly = require('../plotly');
1616
var Registry = require('../registry');
1717
var Lib = require('../lib');
1818
var Color = require('../components/color');
19+
var BADNUM = require('../constants/numerical').BADNUM;
1920

2021
var plots = module.exports = {};
2122

@@ -2013,7 +2014,7 @@ plots.doCalcdata = function(gd, traces) {
20132014
// This ensures there is a calcdata item for every trace,
20142015
// even if cartesian logic doesn't handle it (for things like legends).
20152016
if(!Array.isArray(cd) || !cd[0]) {
2016-
cd = [{x: false, y: false}];
2017+
cd = [{x: BADNUM, y: BADNUM}];
20172018
}
20182019

20192020
// add the trace-wide properties to the first point,

0 commit comments

Comments
 (0)