Šharad | 18 May 2010 15:14
Picon

horizontal chart with stack option set to true

Hi all,

We are using the eZ Components->Graph with php
we had successfully implemented the vertical stack chart by changing property following property
$graph->options->stackBars = false; to $graph->options->stackBars = true; in existing vertical bar chart
Code sample:
    $graph = new ezcGraphBarChart();
    $graph->title=$title;
    $graph->palette = new CustomBarChartPalette();
    $graph->driver = new ezcGraphGdDriver();
    $graph->driver->options->supersampling = 1;
     // Stack bars
    $graph->options->stackBars = true;

Now we are trying to implement horizontal stack chart, in order to implement that we are using class "ezcGraphHorizontalBarChart" and setting its stack bar property to true

$graph = new ezcGraphHorizontalBarChart();
    $graph->title=$title;
    $graph->palette = new CustomBarChartPalette();
    $graph->driver = new ezcGraphGdDriver();
    $graph->driver->options->supersampling = 1;
     // Stack bars
    $graph->options->stackBars = true;

but it seem "$graph->options->stackBars" is not working for horizontal bar chart and as a result we are not getting horizontal stack chart,

could you please help me to implemnt horizontal stack chart.

Thanks in advance,
Sharad

<div><p>Hi all,<br><br>We are using the eZ Components-&gt;Graph with php<br>we had successfully implemented the vertical stack chart by changing property following property <br>$graph-&gt;options-&gt;stackBars = false; to $graph-&gt;options-&gt;stackBars = true; in existing vertical bar chart <br>
Code sample:<br>&nbsp;&nbsp;&nbsp; $graph = new ezcGraphBarChart();<br>&nbsp;&nbsp;&nbsp; $graph-&gt;title=$title;<br>&nbsp;&nbsp;&nbsp; $graph-&gt;palette = new CustomBarChartPalette();<br>&nbsp;&nbsp;&nbsp; $graph-&gt;driver = new ezcGraphGdDriver();<br>&nbsp;&nbsp;&nbsp; $graph-&gt;driver-&gt;options-&gt;supersampling = 1;<br>
&nbsp;&nbsp;&nbsp; &nbsp;// Stack bars<br>&nbsp;&nbsp;&nbsp; $graph-&gt;options-&gt;stackBars = true;<br><br>Now we are trying to implement horizontal stack chart, in order to implement that we are using class "ezcGraphHorizontalBarChart" and setting its stack bar property to true<br><br>$graph = new ezcGraphHorizontalBarChart();<br>&nbsp;&nbsp;&nbsp; $graph-&gt;title=$title;<br>&nbsp;&nbsp;&nbsp; $graph-&gt;palette = new CustomBarChartPalette();<br>&nbsp;&nbsp;&nbsp; $graph-&gt;driver = new ezcGraphGdDriver();<br>&nbsp;&nbsp;&nbsp; $graph-&gt;driver-&gt;options-&gt;supersampling = 1;<br>
&nbsp;&nbsp;&nbsp; &nbsp;// Stack bars<br>&nbsp;&nbsp;&nbsp; $graph-&gt;options-&gt;stackBars = true;<br><br>but it seem "$graph-&gt;options-&gt;stackBars" is not working for horizontal bar chart and as a result we are not getting horizontal stack chart,<br><br>could you please help me to implemnt horizontal stack chart.<br><br>Thanks in advance,<br>Sharad<br></p></div>

Gmane