Commit 248324db authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix position of data label on flow

parent 991edd3b
...@@ -2981,7 +2981,7 @@ ...@@ -2981,7 +2981,7 @@
padding = $$.isBarType(d) ? 4 : 6; padding = $$.isBarType(d) ? 4 : 6;
xPos = points[2][1] + padding * (d.value < 0 ? -1 : 1); xPos = points[2][1] + padding * (d.value < 0 ? -1 : 1);
} else { } else {
xPos = points[0][0] + (points[2][0] - points[0][0]) / 2; xPos = $$.hasType('bar') ? (points[2][0] + points[0][0]) / 2 : points[0][0];
} }
return xPos > $$.width ? $$.width - box.width : xPos; return xPos > $$.width ? $$.width - box.width : xPos;
}; };
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -235,7 +235,7 @@ c3_chart_internal_fn.getXForText = function (points, d, textElement) { ...@@ -235,7 +235,7 @@ c3_chart_internal_fn.getXForText = function (points, d, textElement) {
padding = $$.isBarType(d) ? 4 : 6; padding = $$.isBarType(d) ? 4 : 6;
xPos = points[2][1] + padding * (d.value < 0 ? -1 : 1); xPos = points[2][1] + padding * (d.value < 0 ? -1 : 1);
} else { } else {
xPos = points[0][0] + (points[2][0] - points[0][0]) / 2; xPos = $$.hasType('bar') ? (points[2][0] + points[0][0]) / 2 : points[0][0];
} }
return xPos > $$.width ? $$.width - box.width : xPos; return xPos > $$.width ? $$.width - box.width : xPos;
}; };
......
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