Solved

JFreeChart: Time Series Chart - Set plot line invsible

Posted on 2011-09-28
5
702 Views
Last Modified: 2012-05-12
Can we make the plot line go invisible?

If yes, please provide some sample code. Thanks!
0
Comment
Question by:dshrenik
  • 4
5 Comments
 
LVL 47

Expert Comment

by:for_yan
ID: 36720369
If you want to have just the lines in the plot to be invisible set them to samwe color as the background
0
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
ID: 36720381
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
 

Author Comment

by:dshrenik
ID: 36720450
But, can I explicitly set the visible=false?
This way, I don't have make changes when I change the background color.
0
 
LVL 47

Expert Comment

by:for_yan
ID: 36720472
0
 
LVL 47

Expert Comment

by:for_yan
ID: 36720517

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

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now