Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setJsonConfig has no effect #111

Open
ulfie22 opened this issue Nov 16, 2023 · 2 comments
Open

setJsonConfig has no effect #111

ulfie22 opened this issue Nov 16, 2023 · 2 comments

Comments

@ulfie22
Copy link

ulfie22 commented Nov 16, 2023

Describe the bug
Adding the setJsonConfig option has no effect on the resulting chart

To Reproduce
Steps to reproduce the behavior:

  1. make a chart. (I have tried this on Pie and MultiLine charts)
  2. add the `$chart->setJsonConfig' option as described in the docs

Expected behavior
The changes should show, but they do not. Additional explanation of how to convert the Apex Chart options into the dot notation would be helpful (like where in the option tree to start).

Solution Ideas
From other Issues, it appeared that this was addressed in PR #108 (tag 3.0.1). Not clear why it is still not working.

I am using Laravel 10 (latest update) and Livewire 3 (latest update)

Sample code:

$this->pieChartModel = LivewireCharts::PieChartModel()
            ->setType('pie');

        $this->pieChartModel->addSlice('All Others', 10, '#ff0000');
        $this->pieChartModel->addSlice('X', 20, '#ff6600');
        $this->pieChartModel->addSlice('y', 50, '#ffbb00');

        $this->pieChartModel->setJsonConfig([
            'plotOptions.pie.startAngle' => -90,
            'plotOptions.pie.endAngle' => 90,
            'plotOptions.pie.offsetY' => 10,
            'grid.padding.bottom' => -180,
        ]);

The chart is the same with and without the setJsonConfig options.

CleanShot 2023-11-16 at 13 03 06@2x
@rtaylor82
Copy link

same issue. any update @ulfie22 ?

@ulfie22
Copy link
Author

ulfie22 commented Mar 23, 2024

We ended up going a different direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants