Hey guys, been lurking here for a little while as I just started work on a charting utility for a team at work.
I'm composing several charts (10+) and then building a formatted pdf to display them in. I have a problem with how the charts themselves are being rendered though and I'd like to know if the community has a definitive answer to this issue.
Consider two plots (as .jpg files) displayed one atop the other in a pdf, both are left aligned and both pictures are 400px wide, so far so good.
chart 1:
__________________________________
______________________ |
l 10000 | | |
a | PLOT 2 | |
b | | |
e | | |
l 0 |____________________ | |
0 10 |
label |
_________________________________|
chart 2
__________________________________
________________________ |
l 100 | | |
a | PLOT 2 | |
b | | |
e | | |
l 0 |_______________________ | |
0 10 |
label |
_________________________________|
AHHH Plot 2 is like 30px wider than the one above it, Is there no setting for fixed width to be found in the current source code 1.0.14 ?
There is a ligitimate business reason for wanting these internal graphs to line up regardless of the size of the axis label width, its because they are for logging data over the course of a day and the x-axis is time from 9.00 till 18.00 for example, so to make it easier to determine correlations all the internal plots should line up vertically.
You may say that setting the internal width wont fix the problem, but it will, because the charts right aligned to the pdf, and the right hand side for my purposes is always a standard width (the margin width) , thus the jpg's will grow out to the left of the page but their internal plots will line up perfectly.
Any help in this issue would be appreciated as my only workaround at the moment is to set the NumberFormat on the Y axis to have 9 integer places, making the plots line up from the outside because
100,000,000
has the same width as
[000,000,100]
But thats a terrible solution and detracts from the graphs readabilty, I have tried setting the margin on the graph generator but it doesn't just assign a fixed block of space in which to place the label like setLabelSpace(40px) giving you a nice space like this ::
[ ] in which [ 100,000,000] and [ 100] both reside, rather the margin just tacks on 40px to the size making it look like ::
[ 100,000,000] and [ 100] ; notice how the one with 100,000,000 just grew by [ ] thats no use at all.
Anyways those are my thoughts on the issue so far, any comments on the right way to set the plots lining up would be appreciated.
Dan
**EDIT**
God damn the WYSIWYG editor messing up my ascii art, i'll post pictures later
Fixed Plot widths : Query for a definitive answer
Re: Fixed Plot widths : Query for a definitive answer
hmm.. since your ascii art ist messed up, I'm not shure if I get the point exactly... let's see if I'm right:
You want the plot area - the place between the axes - to be the same in any chart, regardless der width of the lables in each chart? There ist no implementation of this.
But - maybe - the posting here: http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=109651 can Help you - it's a solution for issue with this...
You want the plot area - the place between the axes - to be the same in any chart, regardless der width of the lables in each chart? There ist no implementation of this.

But - maybe - the posting here: http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=109651 can Help you - it's a solution for issue with this...