package org.knowm.xchart.internal.chartpart;
import java.awt.*;
import java.awt.geom.Rectangle2D;
import org.knowm.xchart.internal.series.Series;
import org.knowm.xchart.style.AxesChartStyler;
/**
* @author timmolter
*/
public class Plot_AxesChart extends Plot_ {
/**
* Constructor
*
* @param chart
*/
Plot_AxesChart(Chart chart) {
super(chart);
this.plotSurface = new PlotSurface_AxesChart(chart);
}
@Override
public void paint(Graphics2D g) {
Rectangle2D yAxisBounds = chart.getAxisPair().getLeftYAxisBounds();
Rectangle2D xAxisBounds = chart.getXAxis().getBounds();
// calculate bounds
double xOffset = xAxisBounds.getX();
double yOffset = yAxisBounds.getY();
double width = xAxisBounds.getWidth();
double height = yAxisBounds.getHeight();
this.bounds = new Rectangle2D.Double(xOffset, yOffset, width, height);
super.paint(g);
}
}
Ads help maintain this website.