diff --git a/src/Chart.php b/src/Chart.php
index 7e2d5b6..65bb014 100644
--- a/src/Chart.php
+++ b/src/Chart.php
@@ -24,6 +24,7 @@
use Akaunting\Apexcharts\Support\DatasetClass;
use Akaunting\Apexcharts\Traits\Formatter;
use Akaunting\Apexcharts\Traits\Types;
+use Balping\JsonRaw\Encoder;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\View as ViewFacade;
use Illuminate\View\View;
@@ -182,9 +183,9 @@ public function setOptions(array|Collection $options = [], bool $overwrite = fal
return $this;
}
- public function getOptions(): array
+ public function getOptions(): string
{
- return $this->options;
+ return Encoder::encode($this->options);
}
public function container(string $container = null): Chart|View
diff --git a/src/Views/script.blade copy.php b/src/Views/script.blade copy.php
deleted file mode 100644
index 5b5770a..0000000
--- a/src/Views/script.blade copy.php
+++ /dev/null
@@ -1,43 +0,0 @@
-
diff --git a/src/Views/script.blade.php b/src/Views/script.blade.php
index 53af546..ba9e23b 100644
--- a/src/Views/script.blade.php
+++ b/src/Views/script.blade.php
@@ -1,5 +1,5 @@