ghalex / vue3-charts

Vue3-Charts is an SVG-based charting library that is very easy to use and highly customizable
https://vue3charts.org
MIT License
142 stars 23 forks source link

feature request: option for gap #9

Closed michaelowens closed 3 years ago

michaelowens commented 3 years ago

Hi,

I can't seem to find a way to change the gap between bars.

I noticed there is a gap variable in useBars which is hardcoded to 5. It would be nice to see this configurable to change the spacing between bars. For smaller charts 5 is quite a lot and causes you to have tiny bars.

For example using the default: image

But when I change the built js file to have gaps set to 1.5: image

Thanks in advance! Loving the library.

ghalex commented 3 years ago

Version 1.1.20 has the ability to change the gap:

<Bar
  :dataKeys="['name', 'avg']"
  :barStyle="{ fill: '#0096c7' }"
  :gap="0" // set gap here
/>