ArielMejiaDev / larapex-charts

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

Tooltip / hover not working well #45

Closed JessedeB closed 2 years ago

JessedeB commented 2 years ago

https://gyazo.com/0036b5a5d371f8bed4a42d3055f1f892

The hover to show the data only shows when you hover on the labels it self. Tried to pull in the latest cdn and host the js files myself but that didn't work.

Cheers :)

JessedeB commented 2 years ago

The problem seems to come fromt the script.blade.php at grid: {!! $chart->grid() !!}, when turned of the grid is working like a charm.

ArielMejiaDev commented 2 years ago

I double check this issue, the syntax of the package could be confusing, so to avoid issues by default the charts are going to work without grid, if you choose to generate a chart using the make:chart command you would get different styles based on your selected chart type, but you can override this easily:

To set a default grid (gray with opacity... plays really well with tailwindUI gray colors)

$chart
    ->areaChart()
    ->setGrid()

To customize the grid you can pass color as a string in hex value and a number for the opacity:

$chart
    ->areaChart()
    ->setGrid('#93c5fd', 0.2)

To remove the grid, just remove the setGrid method:

$chart
    ->areaChart()