asantibanez / livewire-charts

Neat Livewire Charts for your Laravel projects
MIT License
787 stars 116 forks source link

Is there a way to add a loading-spinner during the chart loading? #110

Open morganealemany opened 7 months ago

morganealemany commented 7 months ago

Summary

I have a chart that takes time to appear due to lots of datas. I want to add a loading-spinner during this time of loading.

I try to use the wire:loading directive of livewire but it seems that it doesn't work on an entire component.

I try some things like : `

Loading...
    </div>
    <div style="height:32rem" wire:loading.remove>
        <livewire:livewire-column-chart
        key="{{ $columnChartModel->reactiveKey() }}"
        :column-chart-model="$columnChartModel"
        />
    </div>

`

or

`

<livewire:livewire-column-chart key="{{ $columnChartModel->reactiveKey() }}" :column-chart-model="$columnChartModel" />

Loading...

    </div>

`

with no success.

Is there a way to use this wire:loading or another way specific to livewire-charts maybe?

Despite my searches I couldn't find any answers.

lrljoe commented 7 months ago

Are you using livewire 3?