Create SVG donut charts with JavaScript (or jQuery)
Thanks to @tobie we now have the ability to start the Donut's filling from the Top instead of always from the Bottom.
Check the Readme for the new option (anchor
)
I've bumped the version to 2.0.0
with some security updates, and also fixing #7 and #8 .. I had to bump version to a major as there's potentially breaking changes when enabling the responsive mode.
I had to trade-off some code which worked with document-fragments to use innerHTML as it seemed browsers were not updating the layer tree when the preserveAspectRatio
attribute was modified programatically.
I also updated the build to gulp4
Cherry picked @ivan-compucorp commit regarding adding px
to the width/height for standards compliance. This should resolve issues with browsers not rendering the size correctly.
Refer to https://github.com/simeydotme/donutty/pull/5 for original commit.
No longer throws error about styling an non-existing text element.
Thanks to @i1group for their contribution in resolving this long-standing issue.
This release allows the donuts to be initialised when the DOM is ready.
This release allows the options to be passed with text
as a Function
.
text
function optionsee the `Readme.md for more information
note; text function will only work if the donut chart is explicitly created in Javascript, it's not possible to declare a function in the <div data-x />
html style.