0.0.4 • Published 6 years ago
easy-pie-chart-typescript v0.0.4
Easypiechart-v2
This is a rework from the v1 easy-pie-chart. The main reason is to export that awesome chart to a module.
It is rewritten in Typescript.
Renderer
It supports HTML-Canvas and SVG.

Usage
<div class="chart" data-percent="73">73%</div>
<script src="/path/to/easypiechart.js"></script>
<script>
var element = document.querySelector(".chart");
new EasyPieChart(element, {
// your options goes here
});
</script>Options
You can pass these options to the initialize function to set a custom look and feel for the plugin.
Development
Parcel is used for the bundling which bundles the TS-Files in the src- folder.
By simply using the npm run build command, it generates a easyPieChart.js in the dist- folder.
Note: Please, notice the camelcasing!
Get Started
npm i
npm run startFor now, I have pointed in the JS-File app.js to the dist- Folder and its easyPieChart.js.
For Development, you should point to the src/easyPieChart.ts in app.js.
<script src="src/easyPieChart.ts"></script>Test
TODO: Jest