Use of setOpaque( ) with respect to chart Overlays

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
bandaf
Posts: 3
Joined: Wed Mar 19, 2014 1:07 pm
antibot: No, of course not.

Use of setOpaque( ) with respect to chart Overlays

Post by bandaf » Thu Mar 20, 2014 4:49 pm

Hello,

Got a problem with the use of setOpaque( ) with respect to rendering an Overlay. I
have defined a BorderLayout and using CENTER to render my plots from two classes. The
first renders my scatter plot and the second should be an overlay that renders a regression
line.
I have tried setting the regression line overlay to false i.e chartPanel.setOpaque(false);
unfortunately the overlay is not viewable. However, if the regression line overlay is set to true,
chartPanel.setOpaque(true); the overlay is viewable to the exclusion of the scatter plot,
which I feel is what is expected. I have tried changing the plot's transparency value
plot.setBackgroundAlpha(0.5f), for instance, with no success.
Has anyone encountered this scenario and if so where am I going wrong and how can I resolve
the issue. I would like to have both the scatter plot and the regression line visible in the panel.

Many thanks in advance,

Faustin

Locked