public static void main(String argv[]) { RTConfig.setCommandLineArgs(argv); long now = DateTime.getCurrentTimeSec(); long sts = now - DateTime.DaySeconds(3); long ets = now; GoogleChartTemperature gct = new GoogleChartTemperature(); try { gct.setSize(700, 400); gct.setTitle(Color.black, 16, "Temperature"); gct.setTemperatureRange(1, F2C(0.0), F2C(130.0), 10); gct.setDateRange(new DateTime(sts), new DateTime(ets), 8); gct.setDateFormat("MM/dd"); gct.setTimeFormat("HH:mm:ss"); int setCount = 3; int tempCount = 15; gct._addRandomSampleData(setCount, tempCount); System.out.println(gct.toString()); } catch (Throwable th) { Print.logException("Error", th); System.exit(1); } }
public String toString() { StringBuffer sb = new StringBuffer(); sb.append(CHART_API_URL); sb.append("uniq=").append(DateTime.getCurrentTimeSec()).append("&"); sb.append("cht=").append(this.cht).append("&"); sb.append("chs=").append(this.chs).append("&"); sb.append("chxt=").append(this.chxt).append("&"); sb.append("chg=").append(this.chg).append("&"); sb.append("chxl=").append(this.chxl).append("&"); sb.append("chts=").append(this.chts).append("&"); sb.append("chtt=").append(this.chtt).append("&"); sb.append("chco=").append(this.chco).append("&"); sb.append("chdl=").append(this.chdl).append("&"); sb.append("chd=").append(this.chd).append("&"); sb.append("chm=").append(this.chm); return sb.toString(); }