Remove dots, different colors for axis label

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Sanix
Posts: 9
Joined: Fri Dec 01, 2006 4:25 pm

Remove dots, different colors for axis label

Post by Sanix » Thu Jan 11, 2007 2:12 pm

Hi,
I created a second renderer for my second axis. But the second renderer uses these marks on each value(triangles, rectangles, circles). How can I remove them?
To make it more clear which series corresponds to which axis, I added the names of the serieses to the axis labels. Now I would like to use the series color for the axis label.
E.g.:
S1 color = red
S2 color = green

Axis label: [red]S1 name[/red], [green]S2 name[/green], etc.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Thu Jan 11, 2007 6:20 pm

You didn't say which renderer. If it is LineAndShapeRenderer, you can use setSeriesShapesVisible(seriesIndex, false).

For the color of the axis label, you can call setLabelPaint(yourColor) and/or setTickLabelPaint(anotherColor).
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Sanix
Posts: 9
Joined: Fri Dec 01, 2006 4:25 pm

Post by Sanix » Fri Jan 12, 2007 9:31 am

Thank you very much for your answer. Yes it is LineAndShapeRenderer. It works fine now.
I know that I can set the color of the labels with the setLabelPaint method. But it sets one color for the whole label. I need different colors for the same label. Because up to 4 serieses correspond to one axis.

Locked