malwarebytes / altamirabundle
Pretty JS Charts for Symfony using the Altamira library
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 281
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 4
Open Issues: 1
Language:JavaScript
Requires
- php: >=5.3.0
- malwarebytes/altamira: dev-master
This package is not auto-updated.
Last update: 2021-10-01 22:50:41 UTC
README
A PHP abstraction library for JavaScript charting built as a Symfony 2 service bundle.
The following libraries are linked to this bundle via git submodules:
- Jquery
- Flot
- jqPlot
You can jump to any version by checking out the version you want to use via the git submodule.
Getting Started
- Prerequisites: You need a working Symfony2 framework installed and setup.
IMPORTANT - Please follow the directions in order or the JS library dependencies will not be properly built
-
Add the AltamiraBundle ScriptHandler to the
post-install-cmd
andpost-update-cmd
section in scripts in your composer.json file."scripts": { "post-install-cmd": [ "Malwarebytes\\AltamiraBundle\\ScriptHandler::installJSDependencies", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" ], "post-update-cmd": [ "Malwarebytes\\AltamiraBundle\\ScriptHandler::installJSDependencies", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" ] }
NOTE You must add our bundle first before installAssets or you will have to re-run install assets manually.
-
Now install the altamira-bundle via composer.
From your main symfony2 directory, run:
$ composer require malwarebytes/altamirabundle:dev-master
-
Enable the bundle within symfony:
<?php // app/AppKernel.php public function registerBundles() { $bundlles = array ( // ... new Malwarebytes\AltamiraBundle\MalwarebytesAltamiraBundle(), ); }
-
If you would like to see example code, enable the example controller:
# app/config/routing.yml altamira_example: resource: "@MalwarebytesAltamiraBundle/Resources/config/routing.yml" prefix: /chart_demo
Troubleshooting
If there are javascript files missing when you view the example, the JS dependencies may not have been fetched properly. Check that the folders in Resources/public/js/
are not empty.
If code exists in the libs folder, the assets may have failed to be installed into the web folder. Run the following to regenerate the assets:
$ app/console assets:install
Developing
Refer to the sample controller on examples on how to use the code.