Add small margin to grid clippath

parent e27691d1
...@@ -930,9 +930,13 @@ c3_chart_internal_fn.updateSvgSize = function () { ...@@ -930,9 +930,13 @@ c3_chart_internal_fn.updateSvgSize = function () {
var $$ = this, var $$ = this,
brush = $$.svg.select(".c3-brush .background"); brush = $$.svg.select(".c3-brush .background");
$$.svg.attr('width', $$.currentWidth + (isNode() ? 10 : 0)).attr('height', $$.currentHeight); $$.svg.attr('width', $$.currentWidth + (isNode() ? 10 : 0)).attr('height', $$.currentHeight);
$$.svg.selectAll(['#' + $$.clipId, '#' + $$.clipIdForGrid]).select('rect') $$.svg.selectAll('#' + $$.clipId).select('rect')
.attr('width', $$.width) .attr('width', $$.width)
.attr('height', $$.height); .attr('height', $$.height);
// Additional 1px margin not to make last grid line transparent
$$.svg.selectAll('#' + $$.clipIdForGrid).select('rect')
.attr('width', $$.width+1)
.attr('height', $$.height+1);
$$.svg.select('#' + $$.clipIdForXAxis).select('rect') $$.svg.select('#' + $$.clipIdForXAxis).select('rect')
.attr('x', $$.getXAxisClipX.bind($$)) .attr('x', $$.getXAxisClipX.bind($$))
.attr('y', $$.getXAxisClipY.bind($$)) .attr('y', $$.getXAxisClipY.bind($$))
......
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