Solved

JFreeChart: Customize X axis labels for a LineChart

Posted on 2011-09-23
3
1,800 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
  • 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
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…
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…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now