1 package transactions; 2 3 import dinamica.*; 4 5 15 public class TotalsChart extends GenericTransaction 16 { 17 18 21 public int service(Recordset inputParams) throws Throwable 22 { 23 24 int rc = super.service(inputParams); 25 26 27 Recordset rs = getChartInfoRecordset(); 28 29 30 rs.addNew(); 31 rs.setValue("title", "Ventas Totales por Año y Categoría"); 32 rs.setValue("title-x", "Categoría"); rs.setValue("title-y", "Monto en US$"); rs.setValue("column-x", "categoryname"); 35 rs.setValue("column-y", "s1;s2;s3"); rs.setValue("title-series", "1994;1995;1996"); rs.setValue("width", new Integer (680)); rs.setValue("height", new Integer (400)); rs.setValue("data", "total_per_year.sql"); 41 42 rs.setValue("chart-plugin", "dinamica.charts.HorizontalBarChart"); 43 44 45 publish("chartinfo", rs); 46 47 return rc; 48 49 } 50 51 } 52 | Popular Tags |