double[][] dbset = convertToDouble(dset);
return renderGraphics(dbset, (String[])xlabels.toArray(new String[xlabels.size()]));
}
public JComponent renderGraphics(double[][] data, String[] xAxisLabels) {
AxisGraph panel = new AxisGraph();
panel.setTitle(this.getTitle());
panel.setData(data);
panel.setXAxisLabels(xAxisLabels);
panel.setYAxisLabels(this.getYLabel());
panel.setXAxisTitle(this.getFormattedXAxis());
panel.setYAxisTitle(this.getYAxis());
// we should make this configurable eventually
int width = getWidth();
int height = getHeight();
panel.setPreferredSize(new Dimension(width,height));
panel.setSize(new Dimension(width,height));
panel.setWidth(width);
panel.setHeight(width);
setBufferedImage(new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB));
panel.paintComponent(this.getBufferedImage().createGraphics());
return panel;
}