Demo GChartBundle

Info

You you need help or want to report a bug, please use Github issues.

QR Code Demo



Visualization Chart Demo












Simple Chart Demo


6 thoughts on “Demo GChartBundle

  1. Hello,

    i need to add some option like:
    hAxis: {minValue: 0}
    I try to put it in:
    $p = array(‘p’=>’hAxis: {minValue: 0}’);
    $dataTable = new DataTable\DataTable( $p );
    Nothing…

    $dataTable->addColumn(‘id1’, ‘label 1’, ‘string’, ‘hAxis: {minValue: 0}’);
    Nothing…

    And in the twig:
    {{ gchart_bar_chart(dataTable, ‘chart4’, 600, 200, ‘Durée des licenses’, ‘hAxis: {minValue: 0}’) }}

    But nothing…

    Is it possible to use options ?

    Tanks.

  2. Hi,
    Thanks for using GChart. Here is an example of using the hAxis option with linechart:

    {{ gchart_line_chart(dataTable2, 'chart3', 400, 200, 'coucou',{'hAxis': {'title': 'Hello', 'titleTextStyle': {'color': '#FF0000'}}}) }}

    so as you can see, options can be passed as an associative array to almost all twig functions. I hope it helps!

  3. Hello,

    In pie chart I want to show rows even if the value is 0, how to do that in Bundle?
    Thanks you

  4. Hi,
    Did you try to use the `sliceVisibilityThreshold` option when creating the Piechart instance?

    ˋ`ˋ
    // this code was written on a smart phone and was not tested…

    // in controller
    $this->render(‘template’, array(dataTable => …, ‘options’ => array(sliceVisibilityThreshold => 0)));

    // in Twig
    {{ gchart_pie_chart(dataTable, ‘chart1’, 400, 200, ‘title’, options) }}
    ˋ`ˋ

    (Source: http://stackoverflow.com/questions/10422141/display-item-in-legend-even-if-value-0-with-google-charts-tools-pie-chart)

  5. Hi Ajay,

    According to Google Chart documentation on Tooltips, you need to have add a column:


    // in js
    dataTable.addColumn({type: 'string', role: 'tooltip'});

    Unfortunately, the PHP class DataColumn does not handle role attributes.

    Can you please open a github ticket here?

    Please feel free to open a PR if you feel comfortable adding that property to DataColumn class (DataTable::addColumn($id, $label, $type) would have to be updated too (optional role param). If not, I’ll give it a try… Please let me know.

    Thanks,

    Saad

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *