Commit 6ab3a456 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix y domain max/min when undefined

parent c66b8f81
...@@ -445,12 +445,12 @@ ...@@ -445,12 +445,12 @@
if (__data_groups.length > 0) { if (__data_groups.length > 0) {
hasNegativeValue = hasNegativeValueInTargets(targets); hasNegativeValue = hasNegativeValueInTargets(targets);
for (j = 0; j < __data_groups.length; j++) { for (j = 0; j < __data_groups.length; j++) {
if (hasNegativeValue) { baseId = __data_groups[j][0];
ys[__data_groups[j][0]].forEach(function (v, i) { if (hasNegativeValue && ys[baseId]) {
ys[__data_groups[j][0]][i] = v < 0 ? v : 0; ys[baseId].forEach(function (v, i) {
ys[baseId][i] = v < 0 ? v : 0;
}); });
} }
baseId = __data_groups[j][0];
for (k = 1; k < __data_groups[j].length; k++) { for (k = 1; k < __data_groups[j].length; k++) {
id = __data_groups[j][k]; id = __data_groups[j][k];
if (! ys[id]) { continue; } if (! ys[id]) { continue; }
...@@ -469,12 +469,12 @@ ...@@ -469,12 +469,12 @@
if (__data_groups.length > 0) { if (__data_groups.length > 0) {
hasPositiveValue = hasPositiveValueInTargets(targets); hasPositiveValue = hasPositiveValueInTargets(targets);
for (j = 0; j < __data_groups.length; j++) { for (j = 0; j < __data_groups.length; j++) {
if (hasPositiveValue) { baseId = __data_groups[j][0];
ys[__data_groups[j][0]].forEach(function (v, i) { if (hasPositiveValue && ys[baseId]) {
ys[__data_groups[j][0]][i] = v > 0 ? v : 0; ys[baseId].forEach(function (v, i) {
ys[baseId][i] = v > 0 ? v : 0;
}); });
} }
baseId = __data_groups[j][0];
for (k = 1; k < __data_groups[j].length; k++) { for (k = 1; k < __data_groups[j].length; k++) {
id = __data_groups[j][k]; id = __data_groups[j][k];
if (! ys[id]) { continue; } if (! ys[id]) { continue; }
......
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