Download the PHP package saad-tazi/g-chart-bundle without Composer

On this page you can find all versions of the php package saad-tazi/g-chart-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package g-chart-bundle

What is it?

This is a super simple Bundle that facilitates the usage of Google Chart Tool, Google Chart Image API and Google Infographics.

It allows to render:

Added (special recommendations are below):

Make sure you read the Chart Image terms and Chart tool terms before using that bundle.

It also contains some Twig extension that facilitates the integration.

Versions

You should use a different version of this bundle depending on your symfony version:

Symfony version bundle version
5+ 4.x
sf 4.4+ (< 5) 3.2.1+
sf 3.x to 4.3 3.1.1

Demo

http://blog.fruitsoftware.com/a-propos/demo-gchartbundle/

How to install it?

Thanks to AaronDDM, you can use composer to install the bundle.

Or you can use the following method:

  1. Add this bundle to your vendor/ dir:

    • Using the vendors script.

      Add the following lines in your deps file:

      [SaadTaziGChartBundle]
          git=git://github.com/saadtazi/SaadTaziGChartBundle.git
          target=/bundles/SaadTazi/GChartBundle

      Run the vendors script:

      ./bin/vendors install
    • Using git submodules.

      $ git submodule add git://github.com/saadtazi/SaadTaziGChartBundle.git vendor/bundles/SaadTazi/GChartBundle
  2. Add the SaadTazi namespace to your autoloader:

  3. Add this bundle to your application's kernel:

Demo pages

This is optional: If you want to see the demo page, add the following to your routing.yml:

You should have templating installed (php ../composer.phar require templating) and should have activated it in `config/packages/framework.yml:

Then you should be able to go to http://your.site.com/gchart/demo

Don't forget to include the required javascript in your layout, for example:

How to use it?

Mmm, please check the Controller\DemoController to see how to build DataTable, and Resources\views\Demo\demo.html.twig

Notes

I implemented almost all the corechart chart types from the Google Chart Tool. But I only implemented 3 Google Chart Image types, because (they are ugly and) almost all of them can be built using the Google Chart Tool. From the Visualization, I only implemented the marker.

Ohh, please feel free to fork, add to it and send me pull requests!

Note: You don't have to use the Twig functions: you can use the php classes (in DataTable and or in Chart). But you will probably find it a little bit "painful".

Using the added charts

Calendar, Interval and gantt (charts needing dates as datas) :

These are special charts see https://developers.google.com/chart/interactive/docs/gallery/calendar#a-simple-example

These charts needs javascript Date Objects in first column.

As the Js Date Object need to be written (in json) like :

I encountered issues with PHP and Json_encode. To avoid this you had to make your datas like this :

It gives the following json (don't get scared by the '"new Date[[[' and ']]]"', they are substituded when needed in the twig) :

You can had a Tooltip to your datas by using this code :

Support for events

You can define your own callback functions and associate it to the corresponding chart event like this:

Have fun with those mods ;-)

Mods

2012-03-20

2011-10-23

2011-09-22

2011-09-06

2011-06-23


All versions of g-chart-bundle with dependencies

PHP Build Version
Package Version
Requires symfony/framework-bundle Version 5.*|6.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package saad-tazi/g-chart-bundle contains the following files

Loading the files please wait ....