easy-pie-chart icon indicating copy to clipboard operation
easy-pie-chart copied to clipboard

Request: add option for the circle graph to be partially open

Open dja opened this issue 10 years ago • 5 comments

partially open chart

I want to replicate something like this. Any suggestions on how to do the math for drawing the circle?

Thanks!

dja avatar Oct 30 '14 20:10 dja

This plugin does not cover this option yet. If there is a high demand we can add this feature.

The math should be straight forward: A normal circle has 360deg (2π rad). An open circle (lets say 25% open) can be drawn with the arc function of the canvas:

cx.beginPath();
cx.arc(100, 75, 50, 0, (2 * Math.PI) * 3 / 4);
cx.stroke();

Find more information here: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_shapes#Arcs

rendro avatar Oct 31 '14 09:10 rendro

I came across this repo/issue looking for a partial circle solution. +1

jasonvarga avatar Nov 06 '14 16:11 jasonvarga

I came across this repo searching for a semi circle type chart, and found this issue thread. +1

ghost avatar Jan 01 '15 01:01 ghost

@rendro if you get the chance, I think a bunch of us would like a plug and play solution to make this happen :)

dja avatar Feb 12 '15 03:02 dja

+1

peterkr avatar Jan 05 '16 10:01 peterkr