sagnik Posted June 25, 2018 Posted June 25, 2018 Hi, I'm developing a jQuery chart plugin which will allow to create any type of charts but currently donut charts are allowed. It has 2 options, one of those is "maxProgress" and another is "completed". These options can be modified using "max-progress" & "completed" attributes of a "div" element. And in the CSS part has a fixed property of "600" for "stroke-dasharray". And when a donut chart has been created "style=stroke-dashoffset" is added to the "circle" tag inside an svg element using jquery. So what I need to do is, somehow calculate the "stroke-dashoffset" value which cannot be greater than "600".For example, if an user creates the following element:<div class="sgn-charts" max-progress="100" completed="50"></div>Then the circle of the chart should be half-filled. It should work like a clock.Another example is,<div class="sgn-charts" max-progress="100" completed="70"></div>In this case, the circle should look as it looks in an analogue clock when the time is "12:40".Can anyone help me to do this?Thanks in advance. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.