After creating an ellipse using the div
DOM element, here's how I did it:
var body = document.querySelector('body');
var div = document.createElement('div');
div.style.borderRadius = '50%';
div.style.border = '1px solid red';
div.style.left = '60px';
div.style.top = '60px';
div.style.width = '100px';
div.style.height = '100px';
body.appendChild(div);
It's visualized in this image:
https://i.sstatic.net/gfOb1.png
Next, I aim to create both an arc and a pie shape.
https://i.sstatic.net/rIc6X.png
In the second illustration above, users can input the starting angle
and the end angle
of the arc. For our example, the starting angle is set at 180
degrees with an ending angle at 360
degrees.
Additonally, I plan on developing a pie chart where users provide the inside radius of the circle/ellipse along with the starting and ending angles.
https://i.sstatic.net/IBRWH.png
For the third image shown above, the inside radius
is calculated as 50%
of the circle/ellipse width, while the starting angle and ending angle are 90
degrees and 360
degrees respectively.
Is this a feasible task?
P.S: I prefer not to utilize canvas or svg for this project.