leandrocfe / filament-apex-charts

Apex Charts integration for Filament PHP.
https://filament-apex-charts-demo.leandroferreira.dev.br
MIT License
300 stars 38 forks source link

Make chart title div empty if null is passed in header #14

Closed valpuia closed 1 year ago

valpuia commented 1 year ago

Note: This is not an issue, it more like feature suggesstion..

I want to display pie chart, but I don't want Title and other related headings data..

If I passed protected static ?string $heading = null; or 'getHeading(return null)` It display empty div content..

I published vendor file and change according to my need like below (return header content if not null)

<div>
    @if ($heading != null)
        ... // original code

        <x-filament::hr class="py-2" />
    @endif
</div>

Will it be great to return like this (or maybe improvement) if the heading == null or other flag like noHeading

or is there any other way to display chart without header or header content (title, div content, filter etc)