SWT series visibility

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
ahchuan
Posts: 3
Joined: Tue Jun 03, 2008 2:03 am

SWT series visibility

Post by ahchuan » Wed Jun 18, 2008 11:03 am

Hi all:

How to control the visibility of series if the Chart is using SWT instead of Swing? I know there is a mothed called setSeriesVisible() in renderer classes. However, it works for Swing, but not SWT.

Any suggestions are appreciated!!

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 » Wed Jun 18, 2008 1:35 pm

The setSeriesVisible flags are read as part of the rendering process, which writes the chart using ANY instance of Graphics2D. Whether the ultimate target is a Swing component (ChartPanel) or a SWT component (the experimental ChartComposite) or a PDF file (e.g. iText's PdfGraphics2D class), it doesn't alter the path through the rendering code. So I don't think this is something that works for Swing and doesn't work for SWT. Perhaps you can post a pair of self-contained demo apps (one for Swing and one for SWT) that proves me wrong.
David Gilbert
JFreeChart Project Leader

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

ahchuan
Posts: 3
Joined: Tue Jun 03, 2008 2:03 am

Post by ahchuan » Thu Jun 19, 2008 3:30 am

Gilbert, You are right, this method works for both Swing and SWT. I found out that my customized renderer causes the problem.

Thanks for the quick response!!

Locked