Commit 4206f9d6 authored by Quim Llimona's avatar Quim Llimona

`getXValue` fails when x is 0

`getXValue` returns the index when x is specifically 0, because it's falsey. Fixed that by checking the specific case. I have not updated c3.min.js.
parent e127fb0c
......@@ -1403,7 +1403,7 @@
return xValues;
}
function getXValue(id, i) {
return id in c3.data.xs && c3.data.xs[id] && c3.data.xs[id][i] ? c3.data.xs[id][i] : i;
return id in c3.data.xs && c3.data.xs[id] && (c3.data.xs[id][i] || c3.data.xs[id][i] === 0) ? c3.data.xs[id][i] : i;
}
function getOtherTargetXs() {
var idsForX = Object.keys(c3.data.xs);
......
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