Re: Image_Graph: overlapping bar chart
| From: | Jesper Veggerby Hansen | Date: | Tue, 29 Mar 2005 14:53:25 +0000 |
| Subject: | Re: Image_Graph: overlapping bar chart | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18393@lists.php.net to get a copy of this message | ||
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 >