Skip to content

Commit

Permalink
remove charts from core package
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanscherler committed Feb 15, 2021
1 parent d81b045 commit 09195b6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 29 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"license": "MIT",
"require": {
"php": "^7.4|^8.0",
"asantibanez/livewire-charts": "^2.3",
"blade-ui-kit/blade-heroicons": "^0.3",
"calebporzio/sushi": "^2.1",
"danharrin/date-format-converter": "^0.2.0",
Expand Down
21 changes: 0 additions & 21 deletions resources/views/dashboard.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@pushonce('filament-scripts:livewire-charts')
@livewireChartsScripts
@endpushonce

<div>
<x-filament::app-header :title="__('filament::dashboard.title')">
<x-slot name="actions">
Expand Down Expand Up @@ -87,23 +83,6 @@ class="flex items-center space-x-1"
</div>
</x-filament::widget>

<x-filament::widget title="Chart" :columns="2">
<x-slot name="settings">
<x-filament::dropdown-link button>
Chart Setting...
</x-filament::dropdown-link>

<x-filament::dropdown-link>
Another Chart Setting...
</x-filament::dropdown-link>
</x-slot>
<div class="h-96">
<livewire:livewire-column-chart
:column-chart-model="$chart"
/>
</div>
</x-filament::widget>

<x-filament::widget title="Activity">
widget content...
</x-filament::widget>
Expand Down
8 changes: 1 addition & 7 deletions src/Http/Livewire/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,13 @@
namespace Filament\Http\Livewire;

use Livewire\Component;
use Asantibanez\LivewireCharts\Models\ColumnChartModel;

class Dashboard extends Component
{
public function render()
{
return view('filament::.dashboard', [
'chart' => (new ColumnChartModel())
->setTitle('Sample Chart')
->addColumn('Column 1', 100, '#f6ad55')
->addColumn('Column 2', 200, '#fc8181')
->addColumn('Column 3', 300, '#90cdf4'),

//...
])->layout('filament::components.layouts.app');
}
}

0 comments on commit 09195b6

Please sign in to comment.