Hi Dave -
I have checked the developer documentation and searched through the available setter methods, but I haven't found a way to control the paint color of the zoom rectangle lines. The problem that I am having is that I am using a black XYPlot background and the zoom rectangle lines are also black so don't show up. If I use a white chart background, the lines are black and visible.
For the record, I am using 1.0.8a, SWT ChartComposite, and used the following code to set the color of the background:
JFreeChart chart = ChartFactory.createXYLineChart(title, scopeXLabel, scopeYLabel, seriesCollection[0], PlotOrientation.VERTICAL, false, true, false);
chart.setBackgroundPaint(Color.white);
chart.setBorderVisible(true);
chart.setBorderPaint(Color.darkGray);
chart.setAntiAlias(true);
XYPlot scopeXYPlot = chart.getXYPlot();
scopeXYPlot.setBackgroundPaint(Color.black);
I don't know if it matters, but I am using the XYLineAndShape renderer and an XYSeriesCollection[] to hold the data.
How to set paint color of standard zoom rectangle line
How to set paint color of standard zoom rectangle line
Best regards,
Don
Don
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
I'm guessing a bit with the ChartComposite code, but looking through it I can't see anywhere that the rectangle colour is being set. That's probably a bug, but I'd have to study the code some more...
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

