d3pie icon indicating copy to clipboard operation
d3pie copied to clipboard

It is no responsive.

Open Avinash929 opened this issue 8 years ago • 3 comments

Avinash929 avatar Apr 26 '16 11:04 Avinash929

@Avinash929 What behavior would you expect? Can you elaborate?

mojoaxel avatar Sep 07 '16 23:09 mojoaxel

I agree, some responsive behavior would be amazing. I can set the svg and containing element to resize proportionately, but the svg paths inside do not.

Trying to figure out why that is, since charts generated from c3.js can be made responsive fairly easily. I suspect something maybe to do with viewbox positioning but really not sure.

EricJammin avatar Oct 26 '16 02:10 EricJammin

Replace line no. 257 from addSVGSpace method of helpers object

var svg = d3.select(element).append("svg:svg")
 .attr("width", canvasWidth)
 .attr("height", canvasHeight);

with below code.

var svg = d3.select(element).append("svg:svg")
.attr("width", "100%")
.attr("height", "100% ")
.attr('viewBox','0 0 '+canvasWidth+'  '+canvasHeight);

It worked for me.

kishanrajdev avatar Jul 07 '17 17:07 kishanrajdev