For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > March 2005 > Re: [PEAR] Image_Graph: overlapping bar chart









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] Image_Graph: overlapping bar chart
Jesper Veggerby Hansen

2005-03-29, 3:58 pm

Could be possible - though you may consider it a hack...

Use a combination of Image_Graph_Plot_Bar::setBarWidth() to accomplish
the overlapping through setting the width of the individual bars. This
however (maybe) causes the first and last bar to violate the plotarea
boundaries, to fix this simply apply some more "axis padding" (as it's
called, i.e. more space to the left/right of the first/last value). This
is done using Image_Graph_Plotarea::setAxisPadding()

I think it could be possible...

Regards
Jesper Veggerby Hansen


Michael Wallner wrote:
> Hi,
>
> I wonder if the following could be accomplished, and if so, how:
>
> Currently I've got a Graph showing 3 bars, side by side, while I'd
> like to have them overlap:
>
> ^
> | +---+
> | | |
> | | |
> | | |
> | +---+ | |
> | | | | |
> | | | | |
> | +---+ | | | |
> | | | | | | |
> +--------------------->
>
>
>
> ^
> | +------+
> | | |
> | | |
> | | |
> | +-------+ |
> | | | |
> | | | |
> | +--------+ | |
> | | | | |
> +--------------------->
>
> Any advices greatly appreciated!
>
> Thanks,
> --
> Michael - < mike(@)php.net >

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com