From f5b40ec73dddc04383810b3fe283f0b04ca46468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Santib=C3=A1=C3=B1ez?= Date: Sun, 8 Nov 2020 21:53:26 -0500 Subject: [PATCH] Added LivewireCharts facade --- src/Facades/LivewireCharts.php | 27 +++++++++++++++ src/LivewireCharts.php | 47 +++++++++++++++++++++++++++ src/LivewireChartsServiceProvider.php | 2 +- 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 src/Facades/LivewireCharts.php create mode 100644 src/LivewireCharts.php diff --git a/src/Facades/LivewireCharts.php b/src/Facades/LivewireCharts.php new file mode 100644 index 0000000..6ea734e --- /dev/null +++ b/src/Facades/LivewireCharts.php @@ -0,0 +1,27 @@ +singleLine(); + } + + public function multiLineChartModel() + { + return (new LineChartModel) + ->multiLine(); + } + + public function columnChartModel() + { + return (new ColumnChartModel) + ->singleColumn(); + } + + public function multiColumnChartModel() + { + return (new ColumnChartModel) + ->multiColumn(); + } + + public function areaChartModel() + { + return new AreaChartModel; + } + + public function pieChartModel() + { + return new PieChartModel; + } +} diff --git a/src/LivewireChartsServiceProvider.php b/src/LivewireChartsServiceProvider.php index a2f3fbd..e35d711 100755 --- a/src/LivewireChartsServiceProvider.php +++ b/src/LivewireChartsServiceProvider.php @@ -35,6 +35,6 @@ class LivewireChartsServiceProvider extends ServiceProvider */ public function register() { - // + $this->app->bind('livewirecharts', LivewireCharts::class); } }