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

Problem loading the .js files #12

Open
devwal opened this issue Jul 3, 2016 · 0 comments
Open

Problem loading the .js files #12

devwal opened this issue Jul 3, 2016 · 0 comments

Comments

@devwal
Copy link

devwal commented Jul 3, 2016

I tried using the example code and noticed it doesn't load the required .js files.
Only after adding it myself it worked:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript" src="http://www.amcharts.com/lib/amcharts.js"></script>
<?php

include_once '/vendor/autoload.php';
use AmCharts\Chart,
    AmCharts\Manager as ChartManager;


$manager = ChartManager::getInstance();
$manager->setAmChartsPath('./amcharts.js');


$pie = new Chart\Pie();
$pie->setDataProvider(array(
    array(
        'name' => 'Foo',
        'value' => 1
    ),
    array(
        'name' => 'Bar',
        'value' => 3
    ),
    array(
        'name' => 'Baz',
        'value' => 2
    )
));
$pie->setTitleField('name')
    ->setValueField('value');

echo $pie->render();

?>
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

1 participant