File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JavaFX and the fly likes How can we rotate the label on the x-axis: NumberAxis for the LineChart Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JavaFX
Bookmark "How can we rotate the label on the x-axis: NumberAxis for the LineChart" Watch "How can we rotate the label on the x-axis: NumberAxis for the LineChart" New topic
Author

How can we rotate the label on the x-axis: NumberAxis for the LineChart

Mathew Kuruvilla
Ranch Hand

Joined: Nov 27, 2001
Posts: 135
Hi,
I have about 60 datapoints that I need to have in the x-axis, ranging from 0 to 300.
The problem is that there is not enough space to go from 0, 5, 10, 15 . . . ., 100, 105
There is not enough space for more than two digits, if we have 60 ticks on the x-axis.

What are my options for displaying in this case?
Can I rotate the label?
thanks.
Philippe Lhoste
Greenhorn

Joined: Oct 23, 2009
Posts: 28
Again I point to a similar question: Graph and vertical labels.
The lack of answer might mean it isn't currently possible.

Note there is another interesting thread: Javafx line chart with data labels which shows you can do an action on mouse over, eg. displaying a full label in a tooltip...
Mathew Kuruvilla
Ranch Hand

Joined: Nov 27, 2001
Posts: 135
Thanks. Finally, I decided to keep only 60 datapoints in one view. Currently, I am trying to implement a wrapper class for LineChart.Data[] so that I can do a next(), previous(), and current() on it so that I can map this to a button click somewhere beside the chart. Unfortunately, I ran into a problem while doing this. I am starting another thread for that problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can we rotate the label on the x-axis: NumberAxis for the LineChart