Sleek bar graph component for Moon
NPM
$ npm install moon-bars
CDN
<script src="https://unpkg.com/moon-bars"></script>
Initialize the plugin with:
Moon.use(MoonBars);
Then, use the component within any element with a wrapping Moon instance.
<bars
m-literal:data="[5, 7, 4, 3, 5]"
m-literal:fill="['#7bddd3', '#079af9']"
height="100"
width="300">
</bars>
data
- an array of integers, the graph will scale automatically to matchfill
(optional, default#111111
) - a single color or an array of 2 or more color stops in 6 digit hex colors onlyheight
(optional, default100
) - height of graphwidth
(optional, default300
) - width of graph
Licensed under the MIT License by Kabir Shah