Change the line colour in LineAndShapeRenderer.

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

Change the line colour in LineAndShapeRenderer.

Post by Mof » Sat Feb 08, 2003 2:36 am

G'day all,

I was looking through the code in 0.9.5 yesterday, and I noticed that you've used .getItemPaint(...) to set the colour of the line. This would mean that the line colour could turn out to be multiple colours. I'm not sure if this is usefull to people, but I would think that changing the colours of the items was enough.
I think it would also be great to have a function to set the colour of the line individually.
something like get/setLinePaint(...).
What do others think ?

Mof.

David Gilbert

Re: Change the line colour in LineAndShapeRenderer.

Post by David Gilbert » Tue Feb 11, 2003 11:07 am

Hi Mof,

All renderers will call the getItemPaint(...) method to get the color, but this defaults to calling the getSeriesPaint(...) method. That just leaves a hook for anyone who wants to override the getItemPaint(...) method and generate a "multicolor-per-series" chart. It's not something I want to do generally, but plenty of people have asked for it.

You can set the color of the line for a series using the setSeriesPaint(...) methods in the renderer.

Regards,

Dave Gilbert

Locked