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
135 stars 23 forks source link

feature request: hiding axis #8

Closed michaelowens closed 2 years ago

michaelowens commented 2 years ago

Hi,

Would love to see an option to hide the x and/or y axis, leaving the entire canvas available for just the bar/line. This is useful when using the chart as a background or if it's more for a visual representation of change rather than hard numbers.

Thanks in advance!

ghalex commented 2 years ago

Hi @michaelowens,

You are right this is a useful feature. I will consider this but until then you can use chart margin to hide the axis:

const margin = ref({
      left: -41,
      top: 0,
      right: -1,
      bottom: 20
 })

This can give you a chart like this

ghalex commented 2 years ago

Version 1.1.20 now has the ability to hide axis:

const axis = ref({
  primary: {
    hide: true
  },
  secondary: {
    hide: true
  }
})