Colored text labels

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Matt

Colored text labels

Post by Matt » Tue Oct 01, 2002 5:37 pm

Hello all,

I am working with the Gantt charts and was wondering if the task labels could be drawn in different colors. Also is it possible to insert an icon beside the text?

Thanks,
Matt

David Gilbert

Re: Colored text labels

Post by David Gilbert » Tue Oct 01, 2002 11:18 pm

Hi Matt,

The task labels are drawn using category axes, which at present don't offer the features you mentioned. But you ought to be able to create a custom category axis that does what you want. Just subclass VerticalCategoryAxis and override the draw(...) method. Depending on what you do in that method, you might also need to override the reserveAxisArea() and reserveWidth() methods.

Regards,

DG.

Matt

Re: Colored text labels

Post by Matt » Wed Oct 02, 2002 2:22 am

Thanks a lot. I will post the code to this thread once I have it working.

Tip o' the cap to ye!
Matt

Locked