Commit cc794c66 authored by michalkop93's avatar michalkop93

fixes errors on null data

fixes errors thrown when provided with null array e.g. ['data',null,null]
parent 0271a0c8
......@@ -1250,6 +1250,12 @@
if (yTargets.length === 0) { // use current domain if target of axisId is none
return axisId === 'y2' ? y2.domain() : y.domain();
}
if (isNaN(yDomainMin)) { // set minimum to zero when not number
yDomainMin = 0;
}
if (isNaN(yDomainMax)) { // set maximum to have same value as yDomainMin
yDomainMax = yDomainMin;
}
if (yDomainMin === yDomainMax) {
yDomainMin < 0 ? yDomainMax = 0 : yDomainMin = 0;
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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