📄 demodatasetfactory.java
字号:
t1.add(new Day(3, MonthConstants.JULY, 2001), new Double(1.4072)); t1.add(new Day(4, MonthConstants.JULY, 2001), new Double(1.4064)); t1.add(new Day(5, MonthConstants.JULY, 2001), new Double(1.3995)); t1.add(new Day(6, MonthConstants.JULY, 2001), new Double(1.4070)); t1.add(new Day(9, MonthConstants.JULY, 2001), new Double(1.4094)); t1.add(new Day(10, MonthConstants.JULY, 2001), new Double(1.4113)); t1.add(new Day(11, MonthConstants.JULY, 2001), new Double(1.4143)); t1.add(new Day(12, MonthConstants.JULY, 2001), new Double(1.4061)); t1.add(new Day(13, MonthConstants.JULY, 2001), new Double(1.4008)); t1.add(new Day(16, MonthConstants.JULY, 2001), new Double(1.3999)); t1.add(new Day(17, MonthConstants.JULY, 2001), new Double(1.4003)); t1.add(new Day(18, MonthConstants.JULY, 2001), new Double(1.4155)); t1.add(new Day(19, MonthConstants.JULY, 2001), new Double(1.4165)); t1.add(new Day(20, MonthConstants.JULY, 2001), new Double(1.4282)); t1.add(new Day(23, MonthConstants.JULY, 2001), new Double(1.4190)); t1.add(new Day(24, MonthConstants.JULY, 2001), new Double(1.4200)); t1.add(new Day(25, MonthConstants.JULY, 2001), new Double(1.4276)); t1.add(new Day(26, MonthConstants.JULY, 2001), new Double(1.4275)); t1.add(new Day(27, MonthConstants.JULY, 2001), new Double(1.4233)); t1.add(new Day(30, MonthConstants.JULY, 2001), new Double(1.4246)); t1.add(new Day(31, MonthConstants.JULY, 2001), new Double(1.4254)); t1.add(new Day(1, MonthConstants.AUGUST, 2001), new Double(1.4319)); t1.add(new Day(2, MonthConstants.AUGUST, 2001), new Double(1.4321)); t1.add(new Day(3, MonthConstants.AUGUST, 2001), new Double(1.4293)); t1.add(new Day(6, MonthConstants.AUGUST, 2001), new Double(1.4190)); t1.add(new Day(7, MonthConstants.AUGUST, 2001), new Double(1.4176)); t1.add(new Day(8, MonthConstants.AUGUST, 2001), new Double(1.4139)); t1.add(new Day(9, MonthConstants.AUGUST, 2001), new Double(1.4214)); t1.add(new Day(10, MonthConstants.AUGUST, 2001), new Double(1.4266)); t1.add(new Day(11, MonthConstants.AUGUST, 2001), new Double(1.4220)); t1.add(new Day(12, MonthConstants.AUGUST, 2001), new Double(1.4210)); t1.add(new Day(15, MonthConstants.AUGUST, 2001), new Double(1.4383)); t1.add(new Day(16, MonthConstants.AUGUST, 2001), new Double(1.4431)); t1.add(new Day(17, MonthConstants.AUGUST, 2001), new Double(1.4445)); t1.add(new Day(20, MonthConstants.AUGUST, 2001), new Double(1.4444)); t1.add(new Day(21, MonthConstants.AUGUST, 2001), new Double(1.4483)); t1.add(new Day(22, MonthConstants.AUGUST, 2001), new Double(1.4556)); t1.add(new Day(23, MonthConstants.AUGUST, 2001), new Double(1.4468)); t1.add(new Day(24, MonthConstants.AUGUST, 2001), new Double(1.4464)); t1.add(new Day(28, MonthConstants.AUGUST, 2001), new Double(1.4483)); t1.add(new Day(29, MonthConstants.AUGUST, 2001), new Double(1.4519)); t1.add(new Day(30, MonthConstants.AUGUST, 2001), new Double(1.4494)); t1.add(new Day(31, MonthConstants.AUGUST, 2001), new Double(1.4505)); t1.add(new Day(3, MonthConstants.SEPTEMBER, 2001), new Double(1.4519)); t1.add(new Day(4, MonthConstants.SEPTEMBER, 2001), new Double(1.4460)); t1.add(new Day(5, MonthConstants.SEPTEMBER, 2001), new Double(1.4526)); t1.add(new Day(6, MonthConstants.SEPTEMBER, 2001), new Double(1.4527)); t1.add(new Day(7, MonthConstants.SEPTEMBER, 2001), new Double(1.4617)); t1.add(new Day(10, MonthConstants.SEPTEMBER, 2001), new Double(1.4583)); t1.add(new Day(11, MonthConstants.SEPTEMBER, 2001), new Double(1.4693)); t1.add(new Day(12, MonthConstants.SEPTEMBER, 2001), new Double(1.4633)); t1.add(new Day(13, MonthConstants.SEPTEMBER, 2001), new Double(1.4690)); t1.add(new Day(14, MonthConstants.SEPTEMBER, 2001), new Double(1.4691)); t1.add(new Day(17, MonthConstants.SEPTEMBER, 2001), new Double(1.4668)); t1.add(new Day(18, MonthConstants.SEPTEMBER, 2001), new Double(1.4624)); t1.add(new Day(19, MonthConstants.SEPTEMBER, 2001), new Double(1.4678)); t1.add(new Day(20, MonthConstants.SEPTEMBER, 2001), new Double(1.4657)); t1.add(new Day(21, MonthConstants.SEPTEMBER, 2001), new Double(1.4575)); t1.add(new Day(24, MonthConstants.SEPTEMBER, 2001), new Double(1.4646)); t1.add(new Day(25, MonthConstants.SEPTEMBER, 2001), new Double(1.4699)); t1.add(new Day(26, MonthConstants.SEPTEMBER, 2001), new Double(1.4749)); t1.add(new Day(27, MonthConstants.SEPTEMBER, 2001), new Double(1.4756)); t1.add(new Day(28, MonthConstants.SEPTEMBER, 2001), new Double(1.4699)); t1.add(new Day(1, MonthConstants.OCTOBER, 2001), new Double(1.4784)); t1.add(new Day(2, MonthConstants.OCTOBER, 2001), new Double(1.4661)); t1.add(new Day(3, MonthConstants.OCTOBER, 2001), new Double(1.4767)); t1.add(new Day(4, MonthConstants.OCTOBER, 2001), new Double(1.4770)); t1.add(new Day(5, MonthConstants.OCTOBER, 2001), new Double(1.4810)); t1.add(new Day(8, MonthConstants.OCTOBER, 2001), new Double(1.4743)); t1.add(new Day(9, MonthConstants.OCTOBER, 2001), new Double(1.4667)); t1.add(new Day(10, MonthConstants.OCTOBER, 2001), new Double(1.4505)); t1.add(new Day(11, MonthConstants.OCTOBER, 2001), new Double(1.4434)); t1.add(new Day(12, MonthConstants.OCTOBER, 2001), new Double(1.4504)); t1.add(new Day(15, MonthConstants.OCTOBER, 2001), new Double(1.4471)); t1.add(new Day(16, MonthConstants.OCTOBER, 2001), new Double(1.4474)); t1.add(new Day(17, MonthConstants.OCTOBER, 2001), new Double(1.4512)); t1.add(new Day(18, MonthConstants.OCTOBER, 2001), new Double(1.4445)); t1.add(new Day(19, MonthConstants.OCTOBER, 2001), new Double(1.4384)); t1.add(new Day(22, MonthConstants.OCTOBER, 2001), new Double(1.4275)); t1.add(new Day(23, MonthConstants.OCTOBER, 2001), new Double(1.4212)); t1.add(new Day(24, MonthConstants.OCTOBER, 2001), new Double(1.4233)); t1.add(new Day(25, MonthConstants.OCTOBER, 2001), new Double(1.4297)); t1.add(new Day(26, MonthConstants.OCTOBER, 2001), new Double(1.4328)); t1.add(new Day(29, MonthConstants.OCTOBER, 2001), new Double(1.4515)); t1.add(new Day(30, MonthConstants.OCTOBER, 2001), new Double(1.4564)); t1.add(new Day(31, MonthConstants.OCTOBER, 2001), new Double(1.4541)); t1.add(new Day(1, MonthConstants.NOVEMBER, 2001), new Double(1.4624)); t1.add(new Day(2, MonthConstants.NOVEMBER, 2001), new Double(1.4632)); t1.add(new Day(5, MonthConstants.NOVEMBER, 2001), new Double(1.4570)); t1.add(new Day(6, MonthConstants.NOVEMBER, 2001), new Double(1.4588)); t1.add(new Day(7, MonthConstants.NOVEMBER, 2001), new Double(1.4646)); t1.add(new Day(8, MonthConstants.NOVEMBER, 2001), new Double(1.4552)); t1.add(new Day(9, MonthConstants.NOVEMBER, 2001), new Double(1.4579)); t1.add(new Day(12, MonthConstants.NOVEMBER, 2001), new Double(1.4575)); t1.add(new Day(13, MonthConstants.NOVEMBER, 2001), new Double(1.4429)); t1.add(new Day(14, MonthConstants.NOVEMBER, 2001), new Double(1.4425)); t1.add(new Day(15, MonthConstants.NOVEMBER, 2001), new Double(1.4318)); t1.add(new Day(16, MonthConstants.NOVEMBER, 2001), new Double(1.4291)); t1.add(new Day(19, MonthConstants.NOVEMBER, 2001), new Double(1.4140)); t1.add(new Day(20, MonthConstants.NOVEMBER, 2001), new Double(1.4173)); t1.add(new Day(21, MonthConstants.NOVEMBER, 2001), new Double(1.4132)); t1.add(new Day(22, MonthConstants.NOVEMBER, 2001), new Double(1.4131)); t1.add(new Day(23, MonthConstants.NOVEMBER, 2001), new Double(1.4083)); t1.add(new Day(26, MonthConstants.NOVEMBER, 2001), new Double(1.4122)); t1.add(new Day(27, MonthConstants.NOVEMBER, 2001), new Double(1.4136)); t1.add(new Day(28, MonthConstants.NOVEMBER, 2001), new Double(1.4239)); t1.add(new Day(29, MonthConstants.NOVEMBER, 2001), new Double(1.4225)); t1.add(new Day(30, MonthConstants.NOVEMBER, 2001), new Double(1.4260)); } catch (Exception e) { System.err.println(e.getMessage()); } return t1; } /** * Returns a time series of the daily EUR/GBP exchange rates in 2001 (to date), for use in * the JFreeChart demonstration application. * <P> * You wouldn't normally create a time series in this way. Typically, values would * be read from a database. * * @return a time series. * */ public static TimeSeries createEURTimeSeries() { final TimeSeries t1 = new TimeSeries("EUR/GBP"); try { t1.add(new Day(2, MonthConstants.JANUARY, 2001), new Double(1.5788)); t1.add(new Day(3, MonthConstants.JANUARY, 2001), new Double(1.5913)); t1.add(new Day(4, MonthConstants.JANUARY, 2001), new Double(1.5807)); t1.add(new Day(5, MonthConstants.JANUARY, 2001), new Double(1.5711)); t1.add(new Day(8, MonthConstants.JANUARY, 2001), new Double(1.5778)); t1.add(new Day(9, MonthConstants.JANUARY, 2001), new Double(1.5851)); t1.add(new Day(10, MonthConstants.JANUARY, 2001), new Double(1.5846)); t1.add(new Day(11, MonthConstants.JANUARY, 2001), new Double(1.5727)); t1.add(new Day(12, MonthConstants.JANUARY, 2001), new Double(1.5585)); t1.add(new Day(15, MonthConstants.JANUARY, 2001), new Double(1.5694)); t1.add(new Day(16, MonthConstants.JANUARY, 2001), new Double(1.5629)); t1.add(new Day(17, MonthConstants.JANUARY, 2001), new Double(1.5831)); t1.add(new Day(18, MonthConstants.JANUARY, 2001), new Double(1.5624)); t1.add(new Day(19, MonthConstants.JANUARY, 2001), new Double(1.5694)); t1.add(new Day(22, MonthConstants.JANUARY, 2001), new Double(1.5615)); t1.add(new Day(23, MonthConstants.JANUARY, 2001), new Double(1.5656)); t1.add(new Day(24, MonthConstants.JANUARY, 2001), new Double(1.5795)); t1.add(new Day(25, MonthConstants.JANUARY, 2001), new Double(1.5852)); t1.add(new Day(26, MonthConstants.JANUARY, 2001), new Double(1.5797)); t1.add(new Day(29, MonthConstants.JANUARY, 2001), new Double(1.5862)); t1.add(new Day(30, MonthConstants.JANUARY, 2001), new Double(1.5803)); t1.add(new Day(31, MonthConstants.JANUARY, 2001), new Double(1.5714)); t1.add(new Day(1, MonthConstants.FEBRUARY, 2001), new Double(1.5717)); t1.add(new Day(2, MonthConstants.FEBRUARY, 2001), new Double(1.5735)); t1.add(new Day(5, MonthConstants.FEBRUARY, 2001), new Double(1.5691)); t1.add(new Day(6, MonthConstants.FEBRUARY, 2001), new Double(1.5676)); t1.add(new Day(7, MonthConstants.FEBRUARY, 2001), new Double(1.5677)); t1.add(new Day(8, MonthConstants.FEBRUARY, 2001), new Double(1.5737)); t1.add(new Day(9, MonthConstants.FEBRUARY, 2001), new Double(1.5654)); t1.add(new Day(12, MonthConstants.FEBRUARY, 2001), new Double(1.5621)); t1.add(new Day(13, MonthConstants.FEBRUARY, 2001), new Double(1.5761)); t1.add(new Day(14, MonthConstants.FEBRUARY, 2001), new Double(1.5898)); t1.add(new Day(15, MonthConstants.FEBRUARY, 2001), new Double(1.6045)); t1.add(new Day(16, MonthConstants.FEBRUARY, 2001), new Double(1.5852)); t1.add(new Day(19, MonthConstants.FEBRUARY, 2001), new Double(1.5704)); t1.add(new Day(20, MonthConstants.FEBRUARY, 2001), new Double(1.5892)); t1.add(new Day(21, MonthConstants.FEBRUARY, 2001), new Double(1.5844)); t1.add(new Day(22, MonthConstants.FEBRUARY, 2001), new Double(1.5934)); t1.add(new Day(23, MonthConstants.FEBRUARY, 2001), new Double(1.5951)); t1.add(new Day(26, MonthConstants.FEBRUARY, 2001), new Double(1.5848)); t1.add(new Day(27, MonthConstants.FEBRUARY, 2001), new Double(1.5706)); t1.add(new Day(28, MonthConstants.FEBRUARY, 2001), new Double(1.5680)); t1.add(new Day(1, MonthConstants.MARCH, 2001), new Double(1.5645)); t1.add(new Day(2, MonthConstants.MARCH, 2001), new Double(1.5754)); t1.add(new Day(5, MonthConstants.MARCH, 2001), new Double(1.5808)); t1.add(new Day(6, MonthConstants.MARCH, 2001), new Double(1.5766)); t1.add(new Day(7, MonthConstants.MARCH, 2001), new Double(1.5756)); t1.add(new Day(8, MonthConstants.MARCH, 2001), new Double(1.5760)); t1.add(new Day(9, MonthConstants.MARCH, 2001), new Double(1.5748)); t1.add(new Day(12, MonthConstants.MARCH, 2001), new Double(1.5779)); t1.add(new Day(13, MonthConstants.MARCH, 2001), new Double(1.5837)); t1.add(new Day(14, MonthConstants.MARCH, 2001), new Double(1.5886)); t1.add(new Day(15, MonthConstants.MARCH, 2001), new Double(1.5931)); t1.add(new Day(16, MonthConstants.MARCH, 2001), new Double(1.5945)); t1.add(new Day(19, MonthConstants.MARCH, 2001), new Double(1.5880)); t1.add(new Day(20, MonthConstants.MARCH, 2001), new Double(1.5817)); t1.add(new Day(21, MonthConstants.MARCH, 2001), new Double(1.5927)); t1.add(new Day(22, MonthConstants.MARCH, 2001), new Double(1.6065)); t1.add(new Day(23, MonthConstants.MARCH, 2001), new Double(1.6006)); t1.add(new Day(26, MonthConstants.MARCH, 2001), new Double(1.6007)); t1.add(new Day(27, MonthConstants.MARCH, 2001), new Double(1.5989)); t1.add(new Day(28, MonthConstants.MARCH, 2001), new Double(1.6135)); t1.add(new Day(29, MonthConstants.MARCH, 2001), new Double(1.6282)); t1.add(new Day(30, MonthConstants.MARCH, 2001), new Double(1.6090)); t1.add(new Day(2, MonthConstants.APRIL, 2001), new Double(1.6107)); t1.add(new Day(3, MonthConstants.APRIL, 2001), new Double(1.6093));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -