JFreeChart: Time Series Chart - Set plot line invsible

Can we make the plot line go invisible?

If yes, please provide some sample code. Thanks!
dshrenikAsked:
Who is Participating?
 
for_yanCommented:
just get
plot.getBackgroundPaint()

and assign this paint to the series which you want to be invisible, as you assigned color to them before
0
 
for_yanCommented:
If you want to have just the lines in the plot to be invisible set them to samwe color as the background
0
 
dshrenikAuthor Commented:
But, can I explicitly set the visible=false?
This way, I don't have make changes when I change the background color.
0
 
for_yanCommented:

maybe even one method for all series:

 public void setBaseSeriesVisible(boolean visible);
Calls setBaseSeriesVisible(visible, true). See the next method description for details.

But this may not work, as:

The base  flag, which defaults to true, applies when there is no override
flag set and no series level flag set

(see page 468 of the manual).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.