1 package charts; 2 3 import dinamica.*; 4 5 8 public class SalesChart extends GenericTransaction 9 { 10 11 14 public int service(Recordset inputParams) throws Throwable 15 { 16 17 int rc = super.service(inputParams); 18 19 20 Recordset rs = getChartInfoRecordset(); 21 22 23 rs.addNew(); 24 rs.setValue("title", "Total Sales by Category"); 25 rs.setValue("title-x", "Category"); rs.setValue("title-y", "Sales in US$"); rs.setValue("column-x", "categoryname"); 28 29 30 rs.setValue("column-y", "subtotal"); 32 33 rs.setValue("title-series", null); rs.setValue("width", new Integer (500)); rs.setValue("height", new Integer (350)); rs.setValue("data", "sales.sql"); 38 39 rs.setValue("chart-plugin", "dinamica.charts.HorizontalBarChart"); 40 41 42 publish("chartinfo", rs); 43 44 return rc; 45 46 } 47 48 } 49 | Popular Tags |