Commit 0d9f1e2a authored by Masayuki Tanaka's avatar Masayuki Tanaka

Update #1275

parent 4c193b03
......@@ -2796,7 +2796,17 @@
var values = $$.isStepType(d) ? $$.convertValuesToStep(t.values) : t.values;
if (t.id === d.id || indices[t.id] !== indices[d.id]) { return; }
if (targetIds.indexOf(t.id) < targetIds.indexOf(d.id)) {
if (values[i].value * d.value >= 0) {
// check if the x values line up
if (typeof values[i] === 'undefined' || values[i].x !== d.x) {
// if not, try to find the value that does line up
i = -1;
values.forEach(function (v, j) {
if (v.x === d.x) {
i = j;
}
});
}
if (i in values && values[i].value * d.value >= 0) {
offset += scale(values[i].value) - y0;
}
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -42,22 +42,17 @@ c3_chart_internal_fn.getShapeOffset = function (typeFilter, indices, isSub) {
if (t.id === d.id || indices[t.id] !== indices[d.id]) { return; }
if (targetIds.indexOf(t.id) < targetIds.indexOf(d.id)) {
// check if the x values line up
if (typeof values[i] === 'undefined' ||
(values[i].x !== d.x) && (values[i].x - d.x !== 0)) {
if (typeof values[i] === 'undefined' || values[i].x !== d.x) {
// if not, try to find the value that does line up
i = -1;
for (var j in values) {
if ((values[j].x === d.x) || (values[j].x - d.x === 0)) {
values.forEach(function (v, j) {
if (v.x === d.x) {
i = j;
break;
}
}
});
}
if (i in values) {
if (values[i].value * d.value >= 0) {
offset += scale(values[i].value) - y0;
}
if (i in values && values[i].value * d.value >= 0) {
offset += scale(values[i].value) - y0;
}
}
});
......
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