posted 15 years ago
Hi,
I am having a problem with JavaFX charts. I have the chart in the scene managed as part of a stack layout.
I have a button which fetches the data for the LineChart and updates the data as follows:
insert LineChart.Data {
xValue: Float.parseFloat(x)
yValue: Float.parseFloat(y)
} into chartSeries[0].data
The y values range from 0 to 10000 while the x values range from 0 to 1000.
The above line of code works, the chart displays the graph.
However, the tick labels for the y axis, which ranges from 0 to 10000 does not display properly. They get clipped after the first digit.
If I increase the height of the application or maximize the application, the y axis tick labels are displayed properly.
I tried setting the visibility to false and true hoping that the entire scene will get redrawn, but that did not work.
I tried calling the requestLayout, layout() methods on the chart, but that did not work.
My questions:
1) Why is the y axis which ranges from 0-10000 not getting redrawn properly? How can I fix this problem?
2) How can I get the entire stage redrawn?