Download the PHP package heimrichhannot/contao-google-charts-bundle without Composer

On this page you can find all versions of the php package heimrichhannot/contao-google-charts-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 contao-google-charts-bundle

Contao Google Charts Bundle

With this bundle you can visualize data with google charts api

Description

This bundle uses the cmen/google-charts-bundle to display charts. You can use this bundle to display a chart on its own or as a config element of the heimrichhannot/contao-reader-bundle.

Features

Documentation

set up chart config

To display a chart at first you need to create a chart config. Define here which type of chart you want to use and customize attributes of the chart. You need to select a dataType as well. Currently there is json and reference to choose from. If you select reference as dataType you need to set the dataContainer and the dataField which holds the referenced data. You can also set a specific entity to get the data from. This is optional. If you do not set an entity it is set when you use the chart as a reader config element. Otherwise you could set it by an event listener. If the entity is never set, you will get an error.

If you are done creating the chart config there are several ways to display the chart.

display chart by module

The simplest way to display the chart is to create a module that uses the chart configuration to show the chart in frontend.

display chart by reader config element

You can use the chart as reader config element in heimrichhannot/contao-reader-bundle. If you have set the dataType to reference in the chart configuration the entity will be set automatically by the current item id.

DataTypes

When data is added to the chart it has to be of type array.

JSON

Enter valid json that contains pairs of x-/y-values. Please do not enter the labels for the axis in this json but rather use the input fields labelX and labelY.

Reference

To use data that is provided by a certain entity you can use the reference dataType. In the chart config set the dataContainer and dataField which holds the data. Optional you can set the specific entity from which you want to retrieve the data. If you use the chart config for a reader config element the entity will be set automatically when the config element of the item is generated.

how to modify the chart data

IMPORTANT: When you want to add data to the chart keep in mind that this data HAS TO BE AN ARRAY. You can modify the data in two different ways.

DataType

You can add a custom dataType which will be selectable in chart config. Here data is configured and added to the dataType by the setData method. For example for dataType reference the data is pulled here from the referenced entity which is selected by the values (dataContainer, dataField, dataEntity) you've set in the chart configuration.

DataTypes are added as services. Add the '_instanceof' part to your service.yml and add your dataType class like in this example.

GoogleChartsModifyChartDataEvent

Independant from the dataType you've chosen you can modify the chart data by this event. The event holds the chart config and the data that was set by the dataType as parameters. To modify the data you need to set the data in the event using the setData method


All versions of contao-google-charts-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
contao/core-bundle Version ^4.9
cmen/google-charts-bundle Version ^5.0
symfony/config Version ^4.4 || ^5.4
symfony/event-dispatcher-contracts Version ^1.0 || ^2.0 || ^3.0
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 heimrichhannot/contao-google-charts-bundle contains the following files

Loading the files please wait ....