Adrielpin / gchartphp

Automatically exported from code.google.com/p/gchartphp
0 stars 0 forks source link

Generating Simple Bar Chart #17

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a chart of type "gBarChart"
2. Dataset doesn't work right, so add values with ->values = array
3. Generate graph.

What is the expected output? What do you see instead?
Simple bar graph.  It shows up without any bars.

What version of the product are you using? On what operating system?
Version 2 on Debian, php5

Please provide any additional information below.
I can generate the other types of graphs.

Here's my code:

<?$keys = array_keys($chartdata);?>
    <?$values = array_values($chartdata);?>
    <?$barChart = new gBarChart;?>
    <?$barChart->width = 700;?>
    <?$barChart->height = 350;?>
    <?$barChart->values = $values;?>
    <?//$barChart->addDataSet($values);?>
    <?$barChart->valueLabels = $keys;?>
    <img src="<?php print $barChart->getUrl();  ?>" />

Original issue reported on code.google.com by gterkan...@gmail.com on 26 Jan 2009 at 3:48

GoogleCodeExporter commented 8 years ago
It is happening because you cannot use the class gBarChart. You have to use one 
of
the other two subclasses (stacked or grouped).

Original comment by bardellie on 12 May 2010 at 11:58