misd / highcharts-bundle
Integrates PHP Highcharts into your Symfony2 application
Installs: 38
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.3
- misd/highcharts: dev-master
- symfony/framework-bundle: ~2.1
Suggests
- symfony/twig-bundle: to use the Twig functions
This package is auto-updated.
Last update: 2022-02-01 12:23:38 UTC
README
This bundle is currently under development.
This bundle integrates PHP Highcharts into your Symfony2 application, which allows the programmatic creation of Highcharts.
Authors
- Chris Wilkinson chris.wilkinson@admin.cam.ac.uk
Requirements
Installation
-
Add HighchartsBundle to your dependencies:
// composer.json { // ... "require": { // ... "misd/highcharts-bundle": "dev-master" } }
-
Use Composer to download and install HighchartsBundle:
$ php composer.phar update misd/highcharts-bundle
-
Register the bundle in your application:
// app/AppKernel.php class AppKernel extends Kernel { // ... public function registerBundles() { $bundles = array( // ... new Misd\HighchartsBundle\MisdHighchartsBundle() ); } }
Usage
Creating a chart
See the PHP Highcharts documentation for details on how to create a chart object.
Rendering a chart
Use the service:
$chart = $this->container->get('misd_highcharts.renderer')->render($chart);
$container = $this->container->get('misd_highcharts.renderer')->renderContainer($chart);
In a Twig template:
{{ highcharts_render(chart) }}
{{ highcharts_render_container(chart) }}
In a PHP template:
<?php echo $view['misd_highcharts.renderer']->render($chart); ?>
<?php echo $view['misd_highcharts.renderer']->renderContainer($chart); ?>
Reporting an issue or a feature request
Issues and feature requests are tracked in the Github issue tracker.