You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-users@incubator.apache.org by David DURIEUX <d....@siprossii.com> on 2010/09/06 15:09:04 UTC

[zeta-users] Problem with bar too large

Hello,

We use ezcomponents for graph in our GPL software (GLPI).
We have a problem with bar too large like you can see on screenshot. 
This is the code, if you can help me.

Best regards,

David DURIEUX
Tel : +33 (0)4.74.04.81.34
Port : +33 (0)6.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Créacité)
69400 Villefranche sur Saône
FRANCE

Re: [zeta-users] Problem with bar too large

Posted by Kore Nordmann <ma...@kore-nordmann.de>.
Hi,

On Mon, 2010-09-06 at 17:09 +0200, David DURIEUX wrote:
> Hello,
> 
> We use ezcomponents for graph in our GPL software (GLPI).
> We have a problem with bar too large like you can see on screenshot. 
> This is the code, if you can help me.

The merging of steps on the x axis, which is commonly done on labeled
with more then 10 labels was the problem here, it can be fixed like
this:

http://incubator.apache.org/zetacomponents/documentation/trunk/Graph/tutorial.html#lots-of-bars

In your case add this line after assigning the data to the chart:

$graph->xAxis->labelCount = count( $graph->data['printer of comp 10-1'] );

This solves the problem here.

Kind regards,
Kore

-- 
Kore Nordmann                                        (GPG 0xDDC70BBB)
- What I do:                   http://kore-nordmann.de/portfolio.html
- Motivate me:                      http://wishlist.kore-nordmann.de/
- Hire me:                                          http://qafoo.com/