ArielMejiaDev / larapex-charts

A Laravel wrapper for apex charts
https://larapex-charts.netlify.app/
MIT License
290 stars 83 forks source link

Add ability to not show labels on xaxis #101

Open ralphmorris opened 8 months ago

ralphmorris commented 8 months ago

Hey,

Great package!

Here I've added the ability to optionally hide labels on the xaxis. This is useful for charts when the xaxis gets a bit busy and the labels start looking squashed. The labels still show when hovering over the chart.

Hope this is useful. Appreciate your time. Let me know if there are any issues.

Cheers

Ralph

marineusde commented 3 months ago

good idea, I added it (little bit more complex) in my fork in Version 1.4.1:

https://github.com/marineusde/larapex-charts

you can use it easily:

$chart = (new BarChart)
  ->setXAxisOption(
    (new XAxisOption(['test']))
      ->setShowLabels(false)
 );