1

I generate this chart with Jfreechart lib

I would like to hide the labels in axis, but show only the first and the last value, How I can do?

Thank soo much!!

user1507245
  • 11
  • 1
  • 3

1 Answers1

1

I think you have to override NumberAxis.refreshTicks method (If you are using line chart). A bit similar example is available here :

JFreechart: Displaying X axis with values after specific units

When you would set only two tick values by using this function other values would be automatically gets invisible.

Community
  • 1
  • 1
shivshankar
  • 691
  • 2
  • 14
  • 31