ArielMejiaDev / larapex-charts

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

How to turn the legend off? #94

Closed lukejames1111 closed 7 months ago

lukejames1111 commented 7 months ago

I'm looking for a way to turn the legend off directly in Laravel without using CSS. I have tried this to no avail:

return $this->chart->donutChart()
    ->setTitle('Valuations Outcome')
    ->addData($data)
    ->setLabels($labels)
    ->setOptions([
        'legend' => [
            'show' => false
        ]
]);
marineusde commented 7 months ago

I've created a configuration for you in a pull request: #95

ArielMejiaDev commented 7 months ago

Hey @lukejames1111 this ability has been added with a setter by @zwhhz

lukejames1111 commented 4 months ago

Thanks for this, but I've got no idea how to actually turn it off. What is the setter I should be using to remove it?

I tried ->setShowLegend(false) but it still shows?