CombinedXYPlot and Refresh

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Joachim

CombinedXYPlot and Refresh

Post by Joachim » Fri Feb 28, 2003 9:05 am

I encountered a "refresh" problem using the vertical CombinedXYPlot with a HorizontalDateAxis.

The problem I had was that the TickLabels of the date axis and the according DomainTickMarkers were painted at different positions when adding a new JFreechart to the ChartPanel.

I simply inserted a call to the refreshticks-Method of the DateAxis before the Draw-Loop of the subplots.

if (type == VERTICAL)
getDomainAxis().refreshTicks(g2, plotArea, dataArea, getDomainAxisLocation());

// draw all the charts
for (int i = 0; i < n; i++) {
XYPlot plot = (XYPlot) subplots.get(i);
plot.draw(g2, subPlotArea, info);
......


Joachim

David Gilbert

Re: CombinedXYPlot and Refresh

Post by David Gilbert » Tue Mar 04, 2003 11:01 am

Added to the bug database (697164). I will look into it when I get a chance.

Regards,

Dave Gilbert

Locked