Solved

JFreeChart: Customize X axis labels for a LineChart

Posted on 2011-09-23
3
1,998 Views
Last Modified: 2012-05-12
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
Comment
Question by:dshrenik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
3 Comments
 
LVL 47

Expert Comment

by:for_yan
ID: 36590573

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
 
LVL 47

Expert Comment

by:for_yan
ID: 36590590
0
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
ID: 36590644
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question