google-code-export / tatami

Automatically exported from code.google.com/p/tatami
1 stars 1 forks source link

Chart2D changes size when adding second and third plot #31

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Here's the description of a Chart2D containing three Plot objects :

1. Create a Chart2D graph, with a default horizontal axis (ach of the Plot
objects  represented on the chart will have it's own vertical axis, but not
an horizontal one, so the default one is common to all Plot objects). Set
the minimum and maximum values on the horizontal axis to the time values
corresponding to a minimum and a maximum Java.util.Date object (eg: between
"18/07/2009" and "30/07/2009", both dates converted to their Time values,
wich is a long representing the number of miliseconds passed from January
1, 1970 00:00).

2. Add 5 Labels, equally spaced to the default axis object.  The labels'
font, color and size are customized.

3. Add a Plot <Point> object to the chart, containing a Serie <Point>. 
Each Point object is a pair of a time value and the value of a measurement
(double). The color of the plot is customized (red for the first plot). The
fist plot has a vertical axis on the left side of the chart.  The color,
font and size of the labels and major/minor ticks on the vertical axis are
customized.

4. Repeat the step 3, with another set of data (another measurement's
value).  This time, the vertical axis is on the RIGHT size of the graph,
and everything is BLUE. Here is the full description:

  "Add a Plot <Point> object to the chart, containing a Serie <Point>. 
Each Point object is a pair of a time value and the value of a measurement
(double). The color of the plot is customized (BLUE for the SECOND plot).
The SECOND plot has a vertical axis on the RIGHT side of the chart.  The
color, font and size of the labels and major/minor ticks on the vertical
axis are customized."

5. Repeat the step 3, with another set of data (another measurement's
value).  This time, the vertical axis is again on the LEFT size of the
graph, and everything is GREEN. Here is the full description:

  "Add a Plot <Point> object to the chart, containing a Serie <Point>. 
Each Point object is a pair of a time value and the value of a measurement
(double). The color of the plot is customized (GREEN for the THIRD plot).
The THIRD plot has a vertical axis on the LEFT side of the chart.  The
color, font and size of the labels and major/minor ticks on the vertical
axis are customized."

What is the expected output? What do you see instead?
Expected: The Chart2D object keeps it's initial size of 400 px x 400 px
after adding each of the extra plots.
Obtained:  It shrinks instead, each time a new plot is added. It doesn't
seem to be about an automatic "rescaling" of the displayed
plots/labels/axis, but the whole Chart2D object shrinks.  See the attached
screenshots.

What version of the product are you using? On what operating system?
Tatami 1.4, Eclipse 3.5 (Galileo), Java JDK1.6.0_16, Firefox 3.5.6, IE 8,
Windows XP SP3.

Please provide any additional information below.
We're using the Firebug tool also to help us identifying the problem, but
we couldn't find out why this behaviour is.  We're not using any Legend on
the graph (default behaviour is used).
Got no clue.

Thanks,

Original issue reported on code.google.com by Adrian.R...@gmail.com on 28 Jan 2010 at 2:53

Attachments: