Bar Chart Font change for each value

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
tarunvictor
Posts: 6
Joined: Fri Mar 06, 2015 3:20 pm
antibot: No, of course not.

Bar Chart Font change for each value

Post by tarunvictor » Sat Mar 07, 2015 8:32 am

Hi All

I have a unique requirement, I have a bart chart with 10 values, is it possible to give 10 different fonts for all those bar chart

eg
dataset.addValue(x, "ABC", "1")
dataset.addValue(x, "DEF", "1")

for the above 2 bars i need two different fonts and colors for "ABC" and "DEF".

Looking forward for your replies. Thanks in advance

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: Bar Chart Font change for each value

Post by paradoxoff » Mon Mar 09, 2015 11:22 am

I think the methods setTickLabelFont(Comparable category, Font font) and setTickLabelPaint(Comparable category, Paint paint) are what you are looking for.
Otherwise, please provide more context than two lines of code.

Locked