benkeen / d3pie

A configurable pie chart lib and generator built on d3.js
MIT License
370 stars 203 forks source link

100% canvasWidth #146

Open dlednik opened 6 years ago

dlednik commented 6 years ago

Is there a way for canvas to fill the drawing area?

Is something like this possible:

"size": {"canvasWidth": "100%"}

Problem I have is that it's not rendered the same at different resolutions. I would expect SVG to fill the drawing area automatically.

RELNO commented 6 years ago

I'm using this to occupy full containing Div area:

"size": { "canvasHeight": document.getElementById("divName").offsetHeight, "canvasWidth": document.getElementById("divName").offsetWidth, ... },