Hi...
I've put in a test application a chart just like PeriodAxisDemo1 (it was almost a copy/paste). I'm using only one series with 100 elements, but it takes more than 15 seconds to render the chart.
Why does that happens? What makes it so slow comparing tho other types of chart (I compared with TimeSeriesDemo8...)? What should I do to make it render faster? Can you tel me the complexity of this algorithm (On, or On²...)?
ps: I've tryed with two series of 100 and it took apparently the same time to render.
thanks in advance
Takes to long to render....
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Takes to long to render....
Does PeriodAxisDemo1 unmodified take as long? If not, what did you change?leo77 wrote:I've put in a test application a chart just like PeriodAxisDemo1 (it was almost a copy/paste). I'm using only one series with 100 elements, but it takes more than 15 seconds to render the chart.
My guess is that you are populating the dataset one item at a time a triggering a chart repaint for each item, so the chart is being drawn 100 times (roughly six times per second...that still sounds slow to me, but I don't know what hardware you have).
I can't tell anything more than that unless you post the code (a self-contained runnable demo is best).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


I just create a Dataset and add it to the chart... not one item at the time...
here is the code... sorry to take long to post...
the main class
auxiliary classes: Diagram
Compound
ReportTab
can you help me now?
here is the code... sorry to take long to post...
the main class
Code: Select all
package periodtest;
import java.awt.*;
import java.awt.event.*;
import java.beans.*;
import java.text.*;
import java.util.*;
import javax.swing.*;
import org.jfree.chart.*;
import org.jfree.chart.axis.*;
import org.jfree.chart.labels.*;
import org.jfree.chart.plot.*;
import org.jfree.chart.renderer.category.*;
import org.jfree.chart.renderer.xy.*;
import org.jfree.data.category.*;
import org.jfree.data.general.*;
import org.jfree.data.time.*;
import org.jfree.ui.RectangleInsets;
import org.jfree.util.Rotation;
public class StandardReportPanel extends JScrollPane implements ItemListener {
private Diagram d = new Diagram();
private JComboBox graphicType, graphicStyle;
private ReportTab parent;
private String name, visibleName, nameInChart;
private Date start, end;
private static final int pie = 1, bar = 2, historic = 0;
private static final int bar2D = 0, bar3D = 1;
private static final int pie2D = 0, pie3D = 1;
private static final int timeSeries = 0, period = 1;
private String[][] graphicStylesNames = new String[3][2];
private String[] mainTypes;
private StandardChart chart;
private Box out;
private JLabel labelType, labelChartStyle;
public static final int SERIES = 100;
public StandardReportPanel(String name, ReportTab parent) {
super();
JPanel pane = new JPanel(new BorderLayout());
this.parent = parent;
Date sum = new Date(71, 0, 0); //1 year
long sumNumber = sum.getTime();
start = new Date(System.currentTimeMillis());
end = new Date(System.currentTimeMillis() + sumNumber);
setName(name);
nameInChart = name;
visibleName = name;
for (int i = 0; i < graphicStylesNames.length; i++) {
switch(i) {
case bar:
graphicStylesNames[bar][bar2D] = "bar2D";
graphicStylesNames[bar][bar3D] = "bar3D";
break;
case pie:
graphicStylesNames[pie][pie2D] = "pie2D";
graphicStylesNames[pie][pie3D] = "pie3D";
break;
case historic:
graphicStylesNames[historic][timeSeries] = "timeSeries";
graphicStylesNames[historic][period] = "period";
break;
}
}
out = Box.createHorizontalBox();
out.add(Box.createHorizontalGlue());
out.add(centerRight());
out.add(Box.createHorizontalStrut(10));
chart = new StandardChart();
pane.add(new JPanel().add(out), BorderLayout.NORTH);
pane.add(chart, BorderLayout.CENTER);
setViewportView(pane);
}
private Box centerRight() {
Box vert = Box.createVerticalBox();
labelType = new JLabel("Type");
mainTypes = new String[]{"historic", "pie", "bar"};
graphicType = new JComboBox(mainTypes);
graphicType.setSelectedIndex(bar);
graphicType.addItemListener(this);
labelChartStyle = new JLabel("style");
graphicStyle = new JComboBox();
for (int i = 0; i < graphicStylesNames[bar].length; i++) {
graphicStyle.addItem(graphicStylesNames[bar][i]);
}
graphicStyle.setSelectedIndex(bar2D);
graphicStyle.addItemListener(this);
vert.add(Box.createVerticalStrut(10));
vert.add(labelType);
vert.add(Box.createVerticalStrut(5));
vert.add(graphicType);
vert.add(labelChartStyle);
vert.add(Box.createVerticalStrut(5));
vert.add(graphicStyle);
vert.add(Box.createVerticalStrut(20));
return vert;
}
public void itemStateChanged(ItemEvent e) {
if (e.getSource() == graphicType) {
NumberFormat format = NumberFormat.getNumberInstance();
switch (graphicType.getSelectedIndex()) {
case historic:
graphicStyle.removeAllItems();
for (int i = 0; i < graphicStylesNames[historic].length; i++) {
graphicStyle.addItem(graphicStylesNames[historic][i]);
}
graphicStyle.setSelectedIndex(timeSeries);
chart.changeChart(historic, timeSeries);
chart.validate();
break;
case bar:
graphicStyle.removeAllItems();
for (int i = 0; i < graphicStylesNames[bar].length; i++) {
graphicStyle.addItem(graphicStylesNames[bar][i]);
}
graphicStyle.setSelectedIndex(bar2D);
chart.changeChart(bar, bar2D);
chart.validate();
break;
case pie:
graphicStyle.removeAllItems();
graphicStyle.addItem(graphicStylesNames[pie][pie2D]);
graphicStyle.addItem(graphicStylesNames[pie][pie3D]);
graphicStyle.setSelectedIndex(pie2D);
chart.changeChart(pie, pie2D);
chart.validate();
break;
}
} else if (e.getSource() == graphicStyle) {
switch (graphicType.getSelectedIndex()) {
case bar:
switch(graphicStyle.getSelectedIndex()) {
case bar2D:
chart.changeChart(bar, bar2D);
chart.validate();
break;
case bar3D:
chart.changeChart(bar, bar3D);
chart.validate();
break;
}
break;
case pie:
switch(graphicStyle.getSelectedIndex()) {
case pie2D:
chart.changeChart(pie, pie2D);
chart.validate();
break;
case pie3D:
chart.changeChart(pie, pie3D);
chart.validate();
break;
}
break;
case historic:
switch(graphicStyle.getSelectedIndex()) {
case timeSeries:
chart.changeChart(historic, timeSeries);
chart.validate();
break;
case period:
chart.changeChart(historic, period);
chart.validate();
break;
}
break;
}
}
}
private static void generateRandomCategoryValues(double[] values,
String[] compoundNames, Date time, Diagram d) {
if (values.length < d.getNComp() || compoundNames.length < d.getNComp()) {
return;
}
for (int i = 0; i < d.getNComp(); i++) {
Compound c = d.getCompound(i);
compoundNames[i] = c.getName();
Random r = new Random(time.getTime() + i);
values[i] = r.nextDouble()*r.nextInt(65536);
}
}
private static void generateRandomTimeValues(Date[] dates, double[][] values,
String[] compoundNames, Diagram d) {
if (values.length < d.getNComp() || compoundNames.length < d.getNComp()) {
return;
}
int nValues = dates.length;
if (nValues < values[0].length)
nValues = values[0].length;
for (int i = 0; i < d.getNComp(); i++) {
compoundNames[i] = d.getCompound(i).getName();
for (int j = 0; j < nValues; j++) {
Random r = new Random(dates[j].getTime() + i);
values[i][j] = r.nextDouble()*r.nextInt(65536);
}
}
}
private static void generateRandomDates(Date[] dates, Date start, Date end) {
long st = start.getTime();
long nd =end.getTime();
long diff = nd - st + 1;
long[] dateArray = new long[dates.length];
Random r = new Random(7);
for (int i = 0; i < dates.length; i++) {
long time = r.nextLong()%diff + st;
dateArray[i] = time;
}
sortDates(dateArray);
for (int i = 0; i < dates.length; i++) {
dates[i] = new Date();
dates[i].setTime(dateArray[i]);
}
}
private static void sortDates(long[] dates) {
DateSorter.quickSort(dates);
}
private class StandardChart extends JPanel {
protected JFreeChart barChart, barChart3D,
pieChart, pieChart3D,
timeChart, periodChart;
private CardLayout chartManager = new CardLayout();
private final String[] chartID =
new String[] {"bar2D",
"bar3D",
"pie2D",
"pie3D",
"timeSeries",
"period",
};
private final int bar2DIndex = 0,
bar3DIndex = 1,
pie2DIndex = 2,
pie3DIndex = 3,
timeSeriesIndex = 4,
periodIndex = 5;
private StandardChart() {
super();
this.setLayout(chartManager);
DefaultCategoryDataset barDataset = new DefaultCategoryDataset();
createChartBar2D(barDataset);
createChartBar3D(barDataset);
//value generation
Date time = new Date(System.currentTimeMillis());
double[] values = new double[d.getNComp()];
String[] names = new String[d.getNComp()];
for (int i = 0; i < d.getNComp(); i++) {
names[i] = d.getCompound(i).getName();
}
generateRandomCategoryValues(values, names, time, d);
//end
createDataset(bar, bar2D, values, names);
createDataset(bar, bar3D, values, names);
visualbar2DSetup();
visualbar3DSetup();
DefaultPieDataset pieDataset = new DefaultPieDataset();
createChartPie(pieDataset);
createChartPie3D(pieDataset);
createDataset(pie, pie2D, values, names);
createDataset(pie, pie3D, values, names);
visualPie2DSetup();
visualPie3DSetup();
TimeSeriesCollection timeDataset = new TimeSeriesCollection();
createChartTimeSeries(timeDataset);
createChartPeriod(timeDataset);
//value generation
int series = SERIES;
double[][] timeValues = new double[d.getNComp()][series];
Date[] dates = new Date[series];
generateRandomDates(dates, start, end);
generateRandomTimeValues(dates, timeValues, names, d);
//end
createHistoricDataset(timeSeries, dates, timeValues, names);
createHistoricDataset(period, dates, timeValues, names);
visualTimeSeriesSetup();
visualPeriodSetup();
validate();
}
/**
* @param type: dataset type (pie or bar)
* @param style: chart style
* @param values: values in the chart (one for each compound)
* @param compoundNames: names
* */
public void createDataset(int type, int style, double[] values, String[] compoundNames)
throws IllegalArgumentException {
if (type == pie) {
if (style == pie2D) {
DefaultPieDataset pieDataset = new DefaultPieDataset();
int size = values.length;
if (size < compoundNames.length)
size = compoundNames.length;
for (int i = 0; i < size; i++)
pieDataset.setValue(compoundNames[i], values[i]);
PiePlot p = (PiePlot) pieChart.getPlot();
p.setDataset(pieDataset);
} else if (style == pie3D) {
DefaultPieDataset pieDataset = new DefaultPieDataset();
int size = values.length;
if (size < compoundNames.length)
size = compoundNames.length;
for (int i = 0; i < size; i++)
pieDataset.setValue(compoundNames[i], values[i]);
PiePlot p = (PiePlot) pieChart3D.getPlot();
p.setDataset(pieDataset);
} else {
throw new IllegalArgumentException(
"Estilo inválido passado como parâmetro\n" +
"valor inserido: " + style);
}
} else if (type == bar) {
if (style == bar2D) {
DefaultCategoryDataset barDataset = new DefaultCategoryDataset();
int size = values.length;
if (size < compoundNames.length)
size = compoundNames.length;
for (int i = 0; i < size; i++)
barDataset.setValue(values[i], "row", compoundNames[i]);
CategoryPlot p = barChart.getCategoryPlot();
p.setDataset(barDataset);
} else if (style == bar3D) {
DefaultCategoryDataset barDataset = new DefaultCategoryDataset();
int size = values.length;
if (size < compoundNames.length)
size = compoundNames.length;
for (int i = 0; i < size; i++)
barDataset.setValue(values[i], "row", compoundNames[i]);
CategoryPlot p = barChart3D.getCategoryPlot();
p.setDataset(barDataset);
} else {
throw new IllegalArgumentException(
"Estilo inválido passado como parâmetro\n" +
"valor inserido: " + style);
}
} else {
throw new IllegalArgumentException(
"Tipo inválido passado como parâmetro\n" +
"valores válidos: " + pie + " e " + bar + "\n" +
"valor inserido: " + type);
}
}
/**
* @param style: chart style
* @param dates: dates in the chart
* @param values: values in the chart
* @param compoundNames: names
* */
public void createHistoricDataset(int style, Date[] dates, double[][] values,
String[] compoundNames) throws IllegalArgumentException {
int numberOfSeries = compoundNames.length;
if (values.length < numberOfSeries) {
numberOfSeries = values.length;
}
if (style == timeSeries) {
TimeSeriesCollection timeDataset = new TimeSeriesCollection();
for (int i = 0; i < numberOfSeries; i++) {
TimeSeries s = new TimeSeries(compoundNames[i], FixedMillisecond.class);
for (int j = 0; j < dates.length; j++) {
try {
s.addOrUpdate(new FixedMillisecond(dates[j]), values[i][j]);
} catch (org.jfree.data.general.SeriesException x) {
System.out.println(x.getMessage());
continue;
}
}
timeDataset.addSeries(s);
}
XYPlot p = timeChart.getXYPlot();
p.setDataset(timeDataset);
} else if (style == period) {
TimeSeriesCollection timeDataset = new TimeSeriesCollection();
for (int i = 0; i < numberOfSeries; i++) {
TimeSeries s = new TimeSeries(compoundNames[i], FixedMillisecond.class);
for (int j = 0; j < dates.length; j++) {
try {
s.addOrUpdate(new FixedMillisecond(dates[j]), values[i][j]);
} catch (org.jfree.data.general.SeriesException x) {
System.out.println(x.getMessage());
continue;
}
}
timeDataset.addSeries(s);
}
XYPlot p = periodChart.getXYPlot();
p.setDataset(timeDataset);
} else {
throw new IllegalArgumentException(
"Estilo inválido passado como parâmetro\n" +
"valor inserido: " + style);
}
}
public void changeChart(int type, int style) {
if (type == bar) {
if (style == bar2D) {
chartManager.show(this, chartID[bar2DIndex]);
} else if (style == bar3D) {
chartManager.show(this, chartID[bar3DIndex]);
}
} else if (type == pie) {
if (style == pie2D) {
chartManager.show(this, chartID[pie2DIndex]);
} else {
chartManager.show(this, chartID[pie3DIndex]);
}
} else if (type == historic) {
if (style == timeSeries) {
chartManager.show(this, chartID[timeSeriesIndex]);
} else if (style == period) {
chartManager.show(this, chartID[periodIndex]);
}
}
}
private void createChartBar2D(DefaultCategoryDataset barDataset) {
// criando o gráfico de barras 2D
barChart = ChartFactory.createBarChart(
nameInChart, // chart title
"Dados", // domain axis label
"Valor", // range axis label
barDataset, // data
PlotOrientation.VERTICAL, // orientation
false, // include legend
true, // tooltips?
false // URLs?
);
}
private void createChartBar3D(DefaultCategoryDataset barDataset) {
barChart3D = ChartFactory.createBarChart3D(
nameInChart, // chart title
"Dados", // domain axis label
"Valor", // range axis label
barDataset, // data
PlotOrientation.VERTICAL, // orientation
false, // include legend
true, // tooltips
false // urls
);
}
private void createChartPie(DefaultPieDataset pieDataset) {
pieChart = ChartFactory.createPieChart(
nameInChart,
pieDataset,
true, // legend?
true, // tooltips?
false // URLs?
);
}
private void createChartPie3D(DefaultPieDataset pieDataset) {
pieChart3D = ChartFactory.createPieChart3D(
nameInChart, // chart title
pieDataset, // data
true, // include legend
true,
false
);
}
private void createChartTimeSeries(TimeSeriesCollection timeDataset) {
timeChart = ChartFactory.createTimeSeriesChart(
nameInChart, // title
"Data", // x-axis label
"Vazão", // y-axis label
timeDataset, // data
true, // create legend?
true, // generate tooltips?
false // generate URLs?
);
}
private void createChartPeriod(TimeSeriesCollection timeDataset) {
periodChart = ChartFactory.createTimeSeriesChart(
nameInChart,
"Date", "Flow",
timeDataset,
true,
true,
false
);
}
private void visualbar2DSetup() {
JPanel barPanel = new JPanel(new BorderLayout());
CategoryPlot pc = (CategoryPlot) barChart.getPlot();
CategoryItemRenderer renderer = pc.getRenderer();
renderer.setItemLabelGenerator(new StandardCategoryItemLabelGenerator());
renderer.setBaseItemLabelsVisible(true);
ChartPanel barChartPanel = new ChartPanel(barChart, true);
barChartPanel.setMaximumSize(barChartPanel.getPreferredSize());
barPanel.add(barChartPanel, BorderLayout.CENTER);
barPanel.setMaximumSize(barChartPanel.getPreferredSize());
this.add(barPanel, chartID[bar2DIndex]);
}
private void visualbar3DSetup() {
JPanel barPanel = new JPanel(new BorderLayout());
CategoryPlot pc3D = barChart3D.getCategoryPlot();
CategoryAxis axis = pc3D.getDomainAxis();
axis.setCategoryLabelPositions(
CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 8.0)
);
CategoryItemRenderer renderer = pc3D.getRenderer();
renderer.setItemLabelsVisible(true);
renderer.setItemLabelGenerator(new StandardCategoryItemLabelGenerator());
renderer.setBaseItemLabelsVisible(true);
BarRenderer r = (BarRenderer) renderer;
//r.setMaximumBarWidth(0.05);
r.setItemMargin(0.2);
ChartPanel barChartPanel = new ChartPanel(barChart3D, true);
barChartPanel.setMaximumSize(barChartPanel.getPreferredSize());
barPanel.add(barChartPanel, BorderLayout.CENTER);
barPanel.setMaximumSize(barChartPanel.getPreferredSize());
this.add(barPanel, chartID[bar3DIndex]);
}
/**Configure pie2D chart visualization*/
private void visualPie2DSetup() {
JPanel piePanel = new JPanel(new BorderLayout());
PiePlot piePlot = (PiePlot) pieChart.getPlot();
piePlot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0} = {2}",
NumberFormat.getNumberInstance(),
NumberFormat.getPercentInstance()));
ChartPanel pieChartPanel = new ChartPanel(pieChart, true);
pieChartPanel.setMaximumSize(pieChartPanel.getPreferredSize());
piePanel.add(pieChartPanel, BorderLayout.CENTER);
piePanel.setMaximumSize(piePanel.getPreferredSize());
add(piePanel, chartID[pie2DIndex]);
}
/**Configure pie3D chart visualization*/
private void visualPie3DSetup() {
JPanel piePanel = new JPanel(new BorderLayout());
PiePlot3D plot = (PiePlot3D) pieChart3D.getPlot();
plot.setStartAngle(290);
plot.setDirection(Rotation.CLOCKWISE);
plot.setForegroundAlpha(0.5f);
plot.setNoDataMessage("No data to display");
plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0} = {2}",
NumberFormat.getNumberInstance(),
NumberFormat.getPercentInstance()));
ChartPanel pieChartPanel = new ChartPanel(pieChart3D, true);
pieChartPanel.setMaximumSize(pieChartPanel.getPreferredSize());
piePanel.add(pieChartPanel, BorderLayout.CENTER);
piePanel.setMaximumSize(piePanel.getPreferredSize());
add(piePanel, chartID[pie3DIndex]);
}
/**Configure Time Series chart visualization*/
private void visualTimeSeriesSetup() {
JPanel timePanel = new JPanel(new BorderLayout());
XYPlot p = timeChart.getXYPlot();
timeSeriesDateformatConfig();
ChartPanel timeChartPanel = new ChartPanel(timeChart, true);
timeChartPanel.setMaximumSize(timeChartPanel.getPreferredSize());
timePanel.add(timeChartPanel, BorderLayout.CENTER);
timePanel.setMaximumSize(timePanel.getPreferredSize());
add(timePanel, chartID[timeSeriesIndex]);
}
private void timeSeriesDateformatConfig() {
XYPlot p = timeChart.getXYPlot();
XYItemRenderer renderer = p.getRenderer();
StandardXYToolTipGenerator g = new StandardXYToolTipGenerator(
StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT,
new SimpleDateFormat("dd/MM/yyyy HH'h'mm'min'ss's'"),
new DecimalFormat("0.00"));
renderer.setToolTipGenerator(g);
}
/**Configure Period chart visualization*/
private void visualPeriodSetup() {
JPanel timePanel = new JPanel(new BorderLayout());
periodChart.setBackgroundPaint(Color.white);
XYPlot plot = periodChart.getXYPlot();
plot.setBackgroundPaint(Color.lightGray);
plot.setDomainGridlinePaint(Color.white);
plot.setRangeGridlinePaint(Color.white);
plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
plot.setDomainCrosshairVisible(true);
plot.setRangeCrosshairVisible(true);
XYItemRenderer renderer = plot.getRenderer();
if (renderer instanceof XYLineAndShapeRenderer) {
XYLineAndShapeRenderer rr = (XYLineAndShapeRenderer) renderer;
rr.setShapesVisible(true);
rr.setShapesFilled(true);
rr.setItemLabelsVisible(true);
}
periodDateFormatConfig();
ChartPanel timeChartPanel = new ChartPanel(periodChart, true);
timeChartPanel.setMaximumSize(timeChartPanel.getPreferredSize());
timePanel.add(timeChartPanel, BorderLayout.CENTER);
timePanel.setMaximumSize(timePanel.getPreferredSize());
add(timePanel, chartID[periodIndex]);
}
private void periodDateFormatConfig() {
XYPlot plot = periodChart.getXYPlot();
String df = "MM/yyyy";
PeriodAxis domainAxis = new PeriodAxis("Date");
//domainAxis.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
domainAxis.setAutoRangeTimePeriodClass(Month.class);
domainAxis.setMajorTickTimePeriodClass(Month.class);
PeriodAxisLabelInfo[] info = new PeriodAxisLabelInfo[2];
info[0] = new PeriodAxisLabelInfo(Minute.class,
new SimpleDateFormat(df), new RectangleInsets(2, 2, 2, 2),
new Font("SansSerif", Font.BOLD, 10), Color.blue, false,
new BasicStroke(0.0f), Color.lightGray);
info[1] = new PeriodAxisLabelInfo(Year.class,
new SimpleDateFormat(df));
domainAxis.setLabelInfo(info);
plot.setDomainAxis(domainAxis);
}
}
/**Sort the dates with quickSort Algorithm*/
private static class DateSorter {
public static void quickSort(long array[]) {
quickSort(array, 0, array.length - 1);
}
private static void quickSort(long array[], int start, int end) {
int i = start;
int k = end;
if (end - start >= 1) {
long pivot = array[start];
while (k > i) {
while (array[i] <= pivot && i <= end && k > i)
i++;
while (array[k] > pivot && k >= start && k >= i)
k--;
if (k > i)
swap(array, i, k);
}
swap(array, start, k);
quickSort(array, start, k - 1);
quickSort(array, k + 1, end);
} else {
return;
}
}
private static void swap(long array[], int index1, int index2) {
long temp = array[index1];
array[index1] = array[index2];
array[index2] = temp;
}
}
public static void main(String[] args) {
ReportTab r = new ReportTab();
}
}
Code: Select all
package periodtest;
import java.util.ArrayList;
public class Diagram {
private ArrayList<Compound> compoundList = new ArrayList<Compound>();
public Diagram() {
Compound c1 = new Compound("elem 1");
Compound c2 = new Compound("elem 2");
compoundList.add(c1);
compoundList.add(c2);
}
public int getNComp() {
return compoundList.size();
}
public Compound getCompound(int index) {
return compoundList.get(index);
}
}
Code: Select all
package periodtest;
public class Compound {
private String name;
public Compound(String cName) {
name = cName;
}
public String getName() {
return name;
}
}
Code: Select all
package periodtest;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
public class ReportTab extends JFrame {
public ReportTab() {
super("test");
StandardReportPanel p = new StandardReportPanel("Test", this);
setContentPane(p);
pack();
setVisible(true);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
}
}
Leo
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Code: Select all
info[0] = new PeriodAxisLabelInfo(Minute.class,
new SimpleDateFormat(df), new RectangleInsets(2, 2, 2, 2),
new Font("SansSerif", Font.BOLD, 10), Color.blue, false,
new BasicStroke(0.0f), Color.lightGray);
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

