Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Mathew Kuruvilla
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic