Solved

JFreeChart: Customize X axis labels for a LineChart

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
topping3 challenge 14 80
netstat -ano | find "8000" and taskkill /f /pid 2984 3 56
diffSum example 4 37
Java: anonymous class 4 19
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

772 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