When it comes to charting on the web, there are two main heavy-hitters: D3.js and Chart.js. But sometimes you don’t need a 500 pound gorilla. Sometimes you just want simple SVG charts that do exactly what you expect. That’s where Frappe Charts fits in. It’s a tiny, vanilla JS library that provides full-featured, animated, interactive SVG charts. And with a simple component wrapper, you can use it with Vue.js!
Start off by installing vue2-frappe
. (I’m assuming you’ve already got a Vue.js project up and running.)
Next, enable the plugin. (All it does is register the component.)
vue2-frappe
is a simple wrapper for Frappe Charts that simply provides the configuration options to frappe as component properties. You you can directly use Frappe Chart’s documentation by changing top-level option keys into Vue.js property bindings.
The above should result in a chart like the one below:
And that’s just the beginning. Frappe Charts supports a variety of other types of charts - pie charts, bar charts, percentage charts, heatmaps, and advanced line and mixed charts. Take a look at their documentation!
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
While we believe that this content benefits our community, we have not yet thoroughly reviewed it. If you have any suggestions for improvements, please let us know by clicking the “report an issue“ button at the bottom of the tutorial.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!