How can I give the area of some rectangles to svg or something like that and get drawn rectangles?

20 views Asked by At

If I have the area of some rectangles (a percentage relative to screen size for each one) and want to draw them based of those areas(the percentages), can I use SVG to draw them automatically? I mean I don't know how long should be the "length" and the "width" for drawing each one of them(the 'length' can be smaller or longer than 'width'). I need something like a library to give the areas(in percentages relative to screen size) and get rectangles that are drawn on the screen. Suppose I have the areas of these rectangles below,and I need to have a page like this:

For example the areas: [50%, 20%, 7%, 2%, 0.5%,...] for this page:

enter image description here

0

There are 0 answers