javascript - viewbox with pixel value to make d3 chart resposive is not working properly -
I am trying to make D3 charts more sensitive. So I have used the viewbox with pixel values but check that this is not working. If I'm shown below width and height to 100% , then this is a responsive investigation
var Svg ("width", '100%') .attr ("height", '100%') .attr ('view box', '0' + math min (width, height) + '' math. Mean (width, height)) This non-responsive JSField AdEd ("SVG") .attr ("width", 200) .attr ("height") ("width ", 200) .attr ('View Box', '0' '+ Math. (Width, Height) + + + Math. (Width, Height)) I want
height and width Optimize the code from div to <3> width and height in d3> and any jquery Do not want to use functions.
If you are getting rid of height and width esters, then it becomes responsive <(" STV ") .attr ('View Box', '0' + Math. Minute (width, height) / p>
var svg = d3.select ('chart-container')." + Math. Mean (width, height)). RTR ('Protected Aspectratio', 'Xmminium'). Appendix ("G"). Atom ("Transform", "Transform (" + Meth. Min (width, height) / 2 + "," + Math. , Height) / 2 + ")");
Comments
Post a Comment