Mehdi
Mehdi

Reputation: 101

overlap in String X-Axis in jfreeChart

I use jfreechart to draw chart. type of X-axis in chart is string type.When the number of data grows occurs overlapping in x-axis label. my question is how can i control overlapping in String type x-axis. for integer or dateTime type there are solution and methods but for string i have found nothing for string type x-axis. If there is a way please help me.thank you

Upvotes: 1

Views: 1327

Answers (2)

MAK Design Labs
MAK Design Labs

Reputation: 345

One simple way might be to turn your X-axis labels vertical instead of horizontal. I've used this to prevent overlapping in the labels before.

domain.setVerticalTickLabels(true);

Upvotes: 3

trashgod
trashgod

Reputation: 205785

You can use setVerticalTickLabels(true) on your domain axis, as shown in this example.

Upvotes: 2

Related Questions