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

OrgChart is included but not enabled. Why? #339

Open
Dimonka2 opened this issue Jul 16, 2021 · 1 comment
Open

OrgChart is included but not enabled. Why? #339

Dimonka2 opened this issue Jul 16, 2021 · 1 comment
Assignees
Labels

Comments

@Dimonka2
Copy link

What Version?

3.1.14

Issue

Not sure why OrgChart is not enabled in ChartFactory::$CHART_TYPES = []?
I just added it it to the list and it seems to work.
Is there a special reason (except missing documentation) why it is excluded from factory?

Controller Code (chart creation code)

Here is an example of chart that is working after quick ChartFactory tweak:

        $lava = new Lavacharts; 

        $chart = $lava->DataTable();

        $chart->addStringColumn('Title')
            ->addStringColumn('Parent')
            ->addStringColumn('Tooltip');

        $chart->addRow([['v' => 'Test', 'f' => 'Test<br /> <span class="text-danger">n = 100</span>'], '', 'Some test tooltip']);
        $chart->addRow([['v' => 'Test2', 'f' => 'Test 2<br /> <span class="text-success">n = 50</span>'], 'Test', 'Some test tooltip 2']);
        $chart->addRow([['v' => 'Test3', 'f' => 'Test 3<br /> <span class="text-primary">n = 45</span>'], 'Test', 'Some test tooltip 3']);

        $lava->OrgChart('Chart', $chart, [
                'allowHtml' => true,
            ]);

Thanks!

@kevinkhill kevinkhill self-assigned this Jul 24, 2021
@kevinkhill kevinkhill added the bug label Jul 24, 2021
@kevinkhill
Copy link
Owner

You must have found an oversight by me! If you could make a quick PR out of the fix I will merge it.

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

No branches or pull requests

2 participants