• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2437
  • Last Modified:

JFreeChart: Customize X axis labels for a LineChart

I want to customize the labels of a LineChart in the sense that, regardless of the values that I am plotting, I want specific labels on the X-axis.

If possible, please provide some sample code. Thanks!
0
dshrenik
Asked:
dshrenik
  • 3
1 Solution
 
for_yanCommented:

I am not sure waht you mean exactly, but look here about custom label generator:

Did you try custom lablel generator, like in the examples below:


http://www.java2s.com/Code/Java/Chart/JFreeChartBarChartDemo7withacustomitemlabelgenerator.htm

http://sources68.com/jfreechart-pie-chart-3d-demo-4-with-a-custom-label-generator-a748442.html

It allows to chacnge many things about the lable - I didn't see font size change, though, but maybe these will behave differently
0
 
for_yanCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now