Scrolled chart still too small

Paru Somashekar parvathi.somashekar at
Mon Aug 13 15:10:32 PDT 2012

Hi Werner,

I see what you are looking for. You want to know a size to fit all axis 
labels without skipping so you can use that "computed Size" to set on 
the chart. Unfortunately at the moment there is no API to determine that 
size. It is done the other way now - charts are sized outside in, its 
width and height are by default set to a constant size of 500x400.
We could add an API to do what you are asking (which is useful to have 
in any case I think and will file a JIRA tweak for it), however one 
issue I see with that is - when the data is changing dynamically, this 
"computed size" will also change and so setting preferred size once will 
not work. In that case adding scrolling support for XYChart is probably 
the answer.


On 8/10/12 4:31 PM, Werner Lehmann wrote:
> Hi Paru,
> sure - I could even use fitToWidth or fitToHeight on the scrollpane. But that is beside the point. I'd like the chart big enough to show all data without skipping any categories on the x-axis - but not bigger. Unfortunately I don't know how big that is. Basically it should be a "computed size", depending on the data series. If it does not need all room inside the scrollpane, fine. If it needs more, well that's what the scrollpane is for. Does the chart provide a way to get that size so I could make it the preferred size?
> Werner
> ________________________________________
> From: openjfx-dev-bounces at [openjfx-dev-bounces at] On Behalf Of Paru Somashekar [parvathi.somashekar at]
> Sent: Friday, August 10, 2012 21:20
> To: openjfx-dev at
> Subject: Fwd: Re: Scrolled chart still too small
> -------- Original Message --------
> Subject:        Re: Scrolled chart still too small
> Date:   Fri, 10 Aug 2012 11:02:06 -0700
> From:   Paru Somashekar<parvathi.somashekar at>
> To:     Werner Lehmann<lehmann at>
> Hi Werner,
> You can set the preferred size on the chart - something like
> chart.setPrefSize(width,height) - to match the width&   height of the
> scrollpane.
> thanks,
> Paru.

More information about the openjfx-dev mailing list