Commit 494bfaad authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix multiple x timeseries with unbaranced data - #76

parent 8ed8f593
......@@ -1270,7 +1270,7 @@
var x, xKey = getXKey(id);
if (isTimeSeries) {
x = d[xKey] instanceof Date ? d[xKey] : parseDate(d[xKey]);
x = d[xKey] ? d[xKey] instanceof Date ? d[xKey] : parseDate(d[xKey]) : null;
}
else if (isCustomX && !isCategorized) {
x = d[xKey] ? +d[xKey] : getXValue(id, i);
......@@ -1501,7 +1501,7 @@
diff > 0 ? max = med : min = med;
// if candidates are two closest min and max, stop recursive call
if ((max - min) === 1) {
if ((max - min) === 1 || (min === 0 && max === 0)) {
// Get candidates that has same min and max index
candidates = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment