📄 timeseriesdemo8.java
字号:
t1.add(new Day(7, MonthConstants.JUNE, 2001), new Double(1.6333));
t1.add(new Day(8, MonthConstants.JUNE, 2001), new Double(1.6265));
t1.add(new Day(11, MonthConstants.JUNE, 2001), new Double(1.6311));
t1.add(new Day(12, MonthConstants.JUNE, 2001), new Double(1.6238));
t1.add(new Day(13, MonthConstants.JUNE, 2001), new Double(1.6300));
t1.add(new Day(14, MonthConstants.JUNE, 2001), new Double(1.6289));
t1.add(new Day(15, MonthConstants.JUNE, 2001), new Double(1.6276));
t1.add(new Day(18, MonthConstants.JUNE, 2001), new Double(1.6299));
t1.add(new Day(19, MonthConstants.JUNE, 2001), new Double(1.6353));
t1.add(new Day(20, MonthConstants.JUNE, 2001), new Double(1.6378));
t1.add(new Day(21, MonthConstants.JUNE, 2001), new Double(1.6567));
t1.add(new Day(22, MonthConstants.JUNE, 2001), new Double(1.6523));
t1.add(new Day(25, MonthConstants.JUNE, 2001), new Double(1.6418));
t1.add(new Day(26, MonthConstants.JUNE, 2001), new Double(1.6429));
t1.add(new Day(27, MonthConstants.JUNE, 2001), new Double(1.6439));
t1.add(new Day(28, MonthConstants.JUNE, 2001), new Double(1.6605));
t1.add(new Day(29, MonthConstants.JUNE, 2001), new Double(1.6599));
t1.add(new Day(2, MonthConstants.JULY, 2001), new Double(1.6727));
t1.add(new Day(3, MonthConstants.JULY, 2001), new Double(1.6620));
t1.add(new Day(4, MonthConstants.JULY, 2001), new Double(1.6628));
t1.add(new Day(5, MonthConstants.JULY, 2001), new Double(1.6730));
t1.add(new Day(6, MonthConstants.JULY, 2001), new Double(1.6649));
t1.add(new Day(9, MonthConstants.JULY, 2001), new Double(1.6603));
t1.add(new Day(10, MonthConstants.JULY, 2001), new Double(1.6489));
t1.add(new Day(11, MonthConstants.JULY, 2001), new Double(1.6421));
t1.add(new Day(12, MonthConstants.JULY, 2001), new Double(1.6498));
t1.add(new Day(13, MonthConstants.JULY, 2001), new Double(1.6447));
t1.add(new Day(16, MonthConstants.JULY, 2001), new Double(1.6373));
t1.add(new Day(17, MonthConstants.JULY, 2001), new Double(1.6443));
t1.add(new Day(18, MonthConstants.JULY, 2001), new Double(1.6246));
t1.add(new Day(19, MonthConstants.JULY, 2001), new Double(1.6295));
t1.add(new Day(20, MonthConstants.JULY, 2001), new Double(1.6362));
t1.add(new Day(23, MonthConstants.JULY, 2001), new Double(1.6348));
t1.add(new Day(24, MonthConstants.JULY, 2001), new Double(1.6242));
t1.add(new Day(25, MonthConstants.JULY, 2001), new Double(1.6241));
t1.add(new Day(26, MonthConstants.JULY, 2001), new Double(1.6281));
t1.add(new Day(27, MonthConstants.JULY, 2001), new Double(1.6296));
t1.add(new Day(30, MonthConstants.JULY, 2001), new Double(1.6279));
t1.add(new Day(31, MonthConstants.JULY, 2001), new Double(1.6300));
t1.add(new Day(1, MonthConstants.AUGUST, 2001), new Double(1.6290));
t1.add(new Day(2, MonthConstants.AUGUST, 2001), new Double(1.6237));
t1.add(new Day(3, MonthConstants.AUGUST, 2001), new Double(1.6138));
t1.add(new Day(6, MonthConstants.AUGUST, 2001), new Double(1.6121));
t1.add(new Day(7, MonthConstants.AUGUST, 2001), new Double(1.6170));
t1.add(new Day(8, MonthConstants.AUGUST, 2001), new Double(1.6135));
t1.add(new Day(9, MonthConstants.AUGUST, 2001), new Double(1.5996));
t1.add(new Day(10, MonthConstants.AUGUST, 2001), new Double(1.5931));
t1.add(new Day(13, MonthConstants.AUGUST, 2001), new Double(1.5828));
t1.add(new Day(14, MonthConstants.AUGUST, 2001), new Double(1.5824));
t1.add(new Day(15, MonthConstants.AUGUST, 2001), new Double(1.5783));
t1.add(new Day(16, MonthConstants.AUGUST, 2001), new Double(1.5810));
t1.add(new Day(17, MonthConstants.AUGUST, 2001), new Double(1.5761));
t1.add(new Day(20, MonthConstants.AUGUST, 2001), new Double(1.5831));
t1.add(new Day(21, MonthConstants.AUGUST, 2001), new Double(1.5870));
t1.add(new Day(22, MonthConstants.AUGUST, 2001), new Double(1.5808));
t1.add(new Day(23, MonthConstants.AUGUST, 2001), new Double(1.5845));
t1.add(new Day(24, MonthConstants.AUGUST, 2001), new Double(1.5844));
t1.add(new Day(28, MonthConstants.AUGUST, 2001), new Double(1.5924));
t1.add(new Day(29, MonthConstants.AUGUST, 2001), new Double(1.5950));
t1.add(new Day(30, MonthConstants.AUGUST, 2001), new Double(1.5941));
t1.add(new Day(31, MonthConstants.AUGUST, 2001), new Double(1.5968));
t1.add(new Day(3, MonthConstants.SEPTEMBER, 2001), new Double(1.6020));
t1.add(new Day(4, MonthConstants.SEPTEMBER, 2001), new Double(1.6236));
t1.add(new Day(5, MonthConstants.SEPTEMBER, 2001), new Double(1.6352));
t1.add(new Day(6, MonthConstants.SEPTEMBER, 2001), new Double(1.6302));
t1.add(new Day(7, MonthConstants.SEPTEMBER, 2001), new Double(1.6180));
t1.add(new Day(10, MonthConstants.SEPTEMBER, 2001), new Double(1.6218));
t1.add(new Day(11, MonthConstants.SEPTEMBER, 2001), new Double(1.6182));
t1.add(new Day(12, MonthConstants.SEPTEMBER, 2001), new Double(1.6157));
t1.add(new Day(13, MonthConstants.SEPTEMBER, 2001), new Double(1.6171));
t1.add(new Day(14, MonthConstants.SEPTEMBER, 2001), new Double(1.5960));
t1.add(new Day(17, MonthConstants.SEPTEMBER, 2001), new Double(1.5952));
t1.add(new Day(18, MonthConstants.SEPTEMBER, 2001), new Double(1.5863));
t1.add(new Day(19, MonthConstants.SEPTEMBER, 2001), new Double(1.5790));
t1.add(new Day(20, MonthConstants.SEPTEMBER, 2001), new Double(1.5811));
t1.add(new Day(21, MonthConstants.SEPTEMBER, 2001), new Double(1.5917));
t1.add(new Day(24, MonthConstants.SEPTEMBER, 2001), new Double(1.6005));
t1.add(new Day(25, MonthConstants.SEPTEMBER, 2001), new Double(1.5915));
t1.add(new Day(26, MonthConstants.SEPTEMBER, 2001), new Double(1.6012));
t1.add(new Day(27, MonthConstants.SEPTEMBER, 2001), new Double(1.6032));
t1.add(new Day(28, MonthConstants.SEPTEMBER, 2001), new Double(1.6133));
t1.add(new Day(1, MonthConstants.OCTOBER, 2001), new Double(1.6147));
t1.add(new Day(2, MonthConstants.OCTOBER, 2001), new Double(1.6002));
t1.add(new Day(3, MonthConstants.OCTOBER, 2001), new Double(1.6041));
t1.add(new Day(4, MonthConstants.OCTOBER, 2001), new Double(1.6172));
t1.add(new Day(5, MonthConstants.OCTOBER, 2001), new Double(1.6121));
t1.add(new Day(8, MonthConstants.OCTOBER, 2001), new Double(1.6044));
t1.add(new Day(9, MonthConstants.OCTOBER, 2001), new Double(1.5974));
t1.add(new Day(10, MonthConstants.OCTOBER, 2001), new Double(1.5915));
t1.add(new Day(11, MonthConstants.OCTOBER, 2001), new Double(1.6022));
t1.add(new Day(12, MonthConstants.OCTOBER, 2001), new Double(1.6014));
t1.add(new Day(15, MonthConstants.OCTOBER, 2001), new Double(1.5942));
t1.add(new Day(16, MonthConstants.OCTOBER, 2001), new Double(1.5925));
t1.add(new Day(17, MonthConstants.OCTOBER, 2001), new Double(1.6007));
t1.add(new Day(18, MonthConstants.OCTOBER, 2001), new Double(1.6000));
t1.add(new Day(19, MonthConstants.OCTOBER, 2001), new Double(1.6030));
t1.add(new Day(22, MonthConstants.OCTOBER, 2001), new Double(1.6014));
t1.add(new Day(23, MonthConstants.OCTOBER, 2001), new Double(1.5995));
t1.add(new Day(24, MonthConstants.OCTOBER, 2001), new Double(1.5951));
t1.add(new Day(25, MonthConstants.OCTOBER, 2001), new Double(1.5953));
t1.add(new Day(26, MonthConstants.OCTOBER, 2001), new Double(1.6057));
t1.add(new Day(29, MonthConstants.OCTOBER, 2001), new Double(1.6051));
t1.add(new Day(30, MonthConstants.OCTOBER, 2001), new Double(1.6027));
t1.add(new Day(31, MonthConstants.OCTOBER, 2001), new Double(1.6144));
t1.add(new Day(1, MonthConstants.NOVEMBER, 2001), new Double(1.6139));
t1.add(new Day(2, MonthConstants.NOVEMBER, 2001), new Double(1.6189));
t1.add(new Day(5, MonthConstants.NOVEMBER, 2001), new Double(1.6248));
t1.add(new Day(6, MonthConstants.NOVEMBER, 2001), new Double(1.6267));
t1.add(new Day(7, MonthConstants.NOVEMBER, 2001), new Double(1.6281));
t1.add(new Day(8, MonthConstants.NOVEMBER, 2001), new Double(1.6310));
t1.add(new Day(9, MonthConstants.NOVEMBER, 2001), new Double(1.6313));
t1.add(new Day(12, MonthConstants.NOVEMBER, 2001), new Double(1.6272));
t1.add(new Day(13, MonthConstants.NOVEMBER, 2001), new Double(1.6361));
t1.add(new Day(14, MonthConstants.NOVEMBER, 2001), new Double(1.6323));
t1.add(new Day(15, MonthConstants.NOVEMBER, 2001), new Double(1.6252));
t1.add(new Day(16, MonthConstants.NOVEMBER, 2001), new Double(1.6141));
t1.add(new Day(19, MonthConstants.NOVEMBER, 2001), new Double(1.6086));
t1.add(new Day(20, MonthConstants.NOVEMBER, 2001), new Double(1.6055));
t1.add(new Day(21, MonthConstants.NOVEMBER, 2001), new Double(1.6132));
t1.add(new Day(22, MonthConstants.NOVEMBER, 2001), new Double(1.6074));
t1.add(new Day(23, MonthConstants.NOVEMBER, 2001), new Double(1.6065));
t1.add(new Day(26, MonthConstants.NOVEMBER, 2001), new Double(1.6061));
t1.add(new Day(27, MonthConstants.NOVEMBER, 2001), new Double(1.6039));
t1.add(new Day(28, MonthConstants.NOVEMBER, 2001), new Double(1.6069));
t1.add(new Day(29, MonthConstants.NOVEMBER, 2001), new Double(1.6044));
t1.add(new Day(30, MonthConstants.NOVEMBER, 2001), new Double(1.5928));
}
catch (Exception e) {
System.err.println(e.getMessage());
}
return t1;
}
/**
* Creates a chart.
*
* @param dataset the dataset.
*
* @return a chart.
*/
private static JFreeChart createChart(XYDataset dataset) {
JFreeChart chart = ChartFactory.createTimeSeriesChart(
"Time Series Demo 8",
"Date",
"Value",
dataset,
true,
true,
false
);
XYItemRenderer renderer = chart.getXYPlot().getRenderer();
StandardXYToolTipGenerator g = new StandardXYToolTipGenerator(
StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT,
new SimpleDateFormat("d-MMM-yyyy"), new DecimalFormat("0.00")
);
renderer.setToolTipGenerator(g);
return chart;
}
/**
* Creates a panel for the demo (used by SuperDemo.java).
*
* @return A panel.
*/
public static JPanel createDemoPanel() {
JFreeChart chart = createChart(createDataset());
return new ChartPanel(chart);
}
/**
* Starting point for the demonstration application.
*
* @param args ignored.
*/
public static void main(String[] args) {
TimeSeriesDemo8 demo = new TimeSeriesDemo8("Time Series Demo 8");
demo.pack();
RefineryUtilities.centerFrameOnScreen(demo);
demo.setVisible(true);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -