Updated indexify routine in cumulativeLineChart to fix situation where the index value can be undefined.

master
Robin Hu 10 years ago
parent 365863cbe0
commit 0c03b2794b

@ -3222,7 +3222,11 @@ nv.models.cumulativeLineChart = function() {
if (!line.values) {
return line;
}
var v = lines.y()(line.values[idx], idx);
var indexValue = line.values[idx];
if (indexValue == null) {
return line;
}
var v = lines.y()(indexValue, idx);
//TODO: implement check below, and disable series if series loses 100% or more cause divide by 0 issue
if (v < -.95 && !noErrorCheck) {

@ -740,7 +740,11 @@ nv.models.cumulativeLineChart = function() {
if (!line.values) {
return line;
}
var v = lines.y()(line.values[idx], idx);
var indexValue = line.values[idx];
if (indexValue == null) {
return line;
}
var v = lines.y()(indexValue, idx);
//TODO: implement check below, and disable series if series loses 100% or more cause divide by 0 issue
if (v < -.95 && !noErrorCheck) {

Loading…
Cancel
Save