public function buildDashboard() { $quarterlySales = new ChartComponent('quarterlySales'); $quarterlySales->setDimensions(6, 6); $quarterlySales->setCaption("Quarterly Sales"); $quarterlySales->setLabels(array("Q1", "Q2", "Q3", "Q4")); $quarterlySales->addYAxis('quantity', "Quantity"); $quarterlySales->addSeries('sales', "Sales", array(13122, 41312, 46132, 51135), array('numberPrefix' => "\$")); $quarterlySales->addSeries('quantity', "Quantity", array(121, 392, 420, 489), array('yAxis' => 'quantity')); $quarterlySales->addComponentKPI('beverage', array('caption' => 'Beverages', 'value' => 22900, 'numberPrefix' => ' $', 'numberHumanize' => true)); $quarterlySales->addComponentKPI('vegetable', array('caption' => 'Vegetables', 'value' => 10401, 'numberPrefix' => ' $', 'numberHumanize' => true)); $quarterlySales->addComponentKPI('dairy', array('caption' => 'Dairy', 'value' => 27700, 'numberPrefix' => ' $', 'numberHumanize' => true)); $this->addComponent($quarterlySales); $numTickets = new KPIComponent('numTickets'); $numTickets->setDimensions(3, 3); $numTickets->setCaption("Open Support Tickets"); $numTickets->setValue(42); $this->addComponent($numTickets); $satisfactionGauge = new GaugeComponent('satisfactionGauge'); $satisfactionGauge->setDimensions(3, 3); $satisfactionGauge->setCaption('Customer Satisfaction'); $satisfactionGauge->setValue(8); $satisfactionGauge->setLimits(0, 10); $this->addComponent($satisfactionGauge); $ticketPriorities = new KPIGroupComponent('ticketPriorities'); $ticketPriorities->setDimensions(6, 3); $ticketPriorities->setCaption('Ticket Priorities'); $ticketPriorities->addKPI('high', array('caption' => 'High Priority', 'value' => 6)); $ticketPriorities->addKPI('normal', array('caption' => 'Normal Priority', 'value' => 36)); $this->addComponent($ticketPriorities); }
public function buildDashboard() { $labels = []; $data = []; $data2 = []; for ($i = -1; ++$i < 30;) { $labels[$i] = $i + 1 . ' Nov 2014'; $data[$i] = rand(1, 20000); $data2[$i] = rand(1, 20000); } // $c1 = new ChartComponent("c1"); // $c1->setCaption("Sales"); // $c1->setDimensions(4, 4); // $c1->setLabels($labels); // $c1->addSeries("sales", "Sales", $data, array ("seriesDisplayType"=> 'column', "numberPrefix"=> '$')); // $this->addComponent ($c1); $c2 = new ChartComponent("c2"); $c2->setCaption("Sales"); $c2->setDimensions(6, 4); $c2->setLabels($labels); $c2->setYAxis("Hello"); $c2->addYAxis("quantity", "Quantity", array("numberPrefix" => "#", 'numberHumanize' => true)); $c2->addSeries("sales", "Sales", $data, array("seriesDisplayType" => 'column', "numberPrefix" => '$', 'numberHumanize' => true)); $c2->addSeries("sales2", "Sales", $data2, array("seriesDisplayType" => 'column', "numberPrefix" => '$', 'yAxis' => 'quantity', 'numberHumanize' => true)); $c2->setLabelStep(5); $this->addComponent($c2); }
public function buildDashboard() { $chart = new ChartComponent("chart1"); $chart->setDimensions(4, 4); $chart->setCaption("Series Formatting"); $chart->setLabels(array("Jan", "Feb", "Mar")); $chart->addSeries("beverages", "Beverages", array(1355, 1916, 1150), array("seriesDisplayType" => "line", "seriesColor" => "#a4c9f3")); $chart->addSeries("packaged_foods", "Packaged Foods", array(1513, 976, 1321), array("numberPrefix" => "\$", "numberForceDecimals" => true)); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("my_first_chart"); $chart->setCaption("Expenses incurred on Food Consumption by Year"); $chart->setDimensions(8, 6); $chart->setLabels(array("2014-09-01", "2014-09-02", "2014-09-03", "2014-09-04", "2014-09-05", "2014-09-06", "2014-09-07", "2014-09-08", "2014-09-09", "2014-09-10", "2014-09-11", "2014-09-12", "2014-09-13", "2014-09-14", "2014-09-15", "2014-09-16", "2014-09-17", "2014-09-18", "2014-09-19", "2014-09-20", "2014-09-21", "2014-09-22", "2014-09-23", "2014-09-24", "2014-09-25")); $chart->addSeries("spending", "Spending", array(3890, 2837, 2551, 2482, 2903, 2517, 2359, 1888, 1711, 1782, 1551, 1564, 1730, 1324, 1391, 1376, 1365, 1226, 1213, NULL, "NULL1", NULL, NULL, NULL, NULL + "1000"), array('seriesDisplayType' => 'area', 'numberHumanize' => true)); $chart->addSeries("beverages", "Beverages", array(3890, 2837, 2551, 2482, 2903, 2517, 2359, 1888, 1711, 1782, 1551, 1564, 1730, 1324, 1391, 1376, 1365, 1226, 1213, NULL, "NULL2", NULL, NULL, NULL, NULL + "1000"), array('seriesDisplayType' => 'line', 'numberHumanize' => true)); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("my_first_chart"); $chart->setCaption("Expenses incurred for Food Consumption by Month"); $chart->setDimensions(4, 4); $chart->setLabels(["Jan", "Feb", "Mar"]); $chart->addSeries("beverages", "Beverages", [1355, 1916, 1150], array("seriesDisplayType" => "line", "seriesColor" => "#a4c9f3")); $chart->addSeries("packaged_foods", "Packaged Foods", [1513, 976, 1321], array("numberPrefix" => "\$ ", "numberForceDecimals" => TRUE)); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("2011_sales"); $chart->setCaption("2011 Sales"); $chart->setDimensions(4, 4); $chart->setLabels(["Beverages", "Vegetables"]); $chart->addSeries("sales", "Sales", [1343, 7741]); $chart->addSeries("quantity", "Quantity", [76, 119]); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("my_first_chart"); $chart->setCaption("Expenses incurred on Food Consumption by Year"); $chart->setDimensions(4, 4); $chart->setLabels(["2009", "2010", "2011"]); $chart->addSeries("beverages", "Beverages", [1355, 1916, 1150], array('seriesDisplayType' => "bar")); $chart->addSeries("packaged_foods", "Packaged Foods", [1513, 976, 1321], array('seriesDisplayType' => "bar")); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent(); $chart->setCaption("Sales - 2013 vs 2012"); $chart->setDimensions(8, 6); $chart->setLabels(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "July", "Aug", "Sept", "Oct", "Nov", "Dec")); $chart->addSeries("2013", "2013", array(22400, 24800, 21800, 21800, 24600, 27600, 26800, 27700, 23700, 25900, 26800, 24800), array("seriesDisplayType" => "line")); $chart->addSeries("2012", "2012", array(10000, 11500, 12500, 15000, 16000, 17600, 18800, 19700, 21700, 21900, 22900, 20800), array("seriesDisplayType" => "line")); $chart->setYAxis('Sales', array("numberPrefix" => '$', "numberHumanize" => true)); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("my_first_chart"); $chart->setCaption("Car Sales figures"); $chart->setYAxis("Sales", array("numberPrefix" => "\$", "numberHumanize" => true)); $chart->setDimensions(4, 4); $chart->setLabels(["Jan", "Feb", "Mar"]); $chart->addSeries("sales", "Sales", [1355340, 2214134, 1854313], array("seriesDisplayType" => "column", "numberPrefix" => "\$")); $chart->addSeries("car_quantity", "Quantity", [14, 19, 17], array()); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent(); $chart->setCaption("Most spent on activity in a company"); $chart->setDimensions(8, 6); $chart->setLabels(array("Software Development", "Social Networking", "Communication", "Reference", "Utility")); $chart->addSeries("john", "John", array(1.1, 0.3, 1.3, 2.2, 1.6), array("seriesStacked" => true, "seriesDisplayType" => "bar")); $chart->addSeries("mark", "Mark", array(2.1, 0.6, 1.8, 0.9, 1.4), array("seriesStacked" => true, "seriesDisplayType" => "bar")); $chart->setYAxis('', array("numberSuffix" => 'h')); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("my_first_chart"); $chart->setCaption("Expenses incurred for Food Consumption by Month"); $chart->setYAxis("Sales", array("numberPrefix" => "\$")); $chart->setDimensions(4, 4); $chart->setLabels(["Jan", "Feb", "Mar"]); $chart->addSeries("beverages", "Beverages", [1355, 1916, 1150]); $chart->addSeries("packaged_foods", "Packaged Foods", [1513, 976, 1321]); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("Monthly Sales Summary Comparision"); $chart->setCaption("Sales - 2013 v 2012"); $chart->setDimensions(8, 6); $chart->setLabels(["Jan", "Feb", "Mar", "Apr", "May", "Jun", "July", "Aug", "Sept", "Oct", "Nov", "Dec"]); $chart->addSeries("2013", "2013", [22400, 24800, 21800, 21800, 24600, 27600, 26800, 27700, 23700, 25900, 26800, 24800], array("seriesStacked" => true, "seriesDisplayType" => "bar")); $chart->addSeries("2012", "2012", [10000, 11500, 12500, 15000, 16000, 17600, 18800, 19700, 21700, 21900, 22900, 20800], array("seriesStacked" => true, "seriesDisplayType" => "bar")); $chart->setYAxis('', array("numberPrefix" => '$', "numberHumanize" => true)); $this->addComponent($chart); }
public function buildDashboard() { $quarterlySales = new ChartComponent('quarterlySales'); $quarterlySales->setDimensions(6, 6); $quarterlySales->setCaption("Quarterly Sales"); $quarterlySales->setLabels(array("Q1", "Q2", "Q3", "Q4")); $quarterlySales->addYAxis('quantity', "Quantity"); $quarterlySales->addSeries('sales', "Sales", array(13122, 41312, 46132, 51135), array('numberPrefix' => "\$")); $quarterlySales->addSeries('quantity', "Quantity", array(121, 392, 420, 489), array('yAxis' => 'quantity')); $this->addComponent($quarterlySales); }
public function buildDashboard() { $chart = new ChartComponent("chart1"); $chart->setCaption("The first Chart"); $chart->setOption('showLegendFlag', false); $chart->setDimensions(2, 2); $chart->setLabels(["Jan", "Feb", "Mar"]); $chart->addSeries("beverages", "Beverages", array(1355, 1916, 1150), array("seriesDisplayType" => "line")); $chart->addSeries("packaged_foods", "Packaged Foods", array(1513, 976, 1321), array("seriesDisplayType" => "line")); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent('chart'); $chart->setCaption("Costs by division - 2013 vs 2012"); $chart->setDimensions(8, 6); $chart->setLabels(array('Manufacturing', 'Publishing', 'Transportation', 'Communications')); $chart->addSeries("sales2013", "2013", array(24400, 27800, 23800, 24800), array("seriesDisplayType" => 'bar')); $chart->addSeries("sales2012", "2012", array(15000, 15000, 17500, 20000), array("seriesDisplayType" => 'bar')); $chart->setYAxis('', array("numberPrefix" => '$', "numberHumanize" => true)); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("my_first_chart"); $chart->setCaption("Expenses incurred on Food Consumption by Year"); $chart->setDimensions(6, 6); $chart->setLabels(["2009", "2010", "2011"]); $chart->addSeries("beverages", "Beverages", [1355, 1916, 1150]); $chart->addSeries("packaged_foods", "Packaged Foods", [1513, 976, 1321]); $chart->addComponentKPI("first", array("caption" => "Quantity", "value" => 20)); $chart->addComponentKPI("second", array("caption" => "Revenue", "value" => 4200000, "numberPrefix" => "\$", "numberHumanize" => true)); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("my_first_chart"); $chart->setCaption("Expenses incurred on Food Consumption by Year"); $chart->setDimensions(4, 4); $chart->setLabels(["2009", "2010", "2011"]); $chart->addSeries("beverages", "Beverages", [1355, 1916, 1150]); $chart->addSeries("packaged_foods", "Packaged Foods", [1513, 976, 1321]); $chart->addDrillStep("firstDrill", $this); $chart->addDrillStep("secondDrill", $this); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("2011_sales"); $chart->setDimensions(4, 4); $chart->setCaption("Stacked Column Chart"); $chart->setYAxis("", array('numberPrefix' => "\$")); $chart->setLabels(["Jan", "Feb", "Mar"]); $chart->addSeries("beverages", "Beverages", [1355, 1916, 1150], array('numberPrefix' => "\$", 'seriesStacked' => true, 'seriesDisplayType' => "column")); $chart->addSeries("packaged_foods", "Packaged Foods", [1513, 976, 1321], array('numberPrefix' => "\$", 'seriesStacked' => true, 'seriesDisplayType' => "column")); $chart->addSeries("vegetables", "Vegetables", [1313, 1976, 924], array('numberPrefix' => "\$", 'seriesStacked' => true, 'seriesDisplayType' => "column")); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("chart1"); $chart->setCaption("The first Chart"); $chart->setDimensions(4, 4); $chart->setLabels(["Jan", "Feb", "Mar"]); $chart->addSeries("beverages", "Beverages", array(1355, 1916, 1150)); $chart->addSeries("packaged_foods", "Packaged Foods", array(1513, 976, 1321)); $this->setDashboardTitle('Sales'); $this->setActive(); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("sales_chart"); $chart->setCaption("Sales - 2013 vs 2012"); $chart->setDimensions(8, 6); $chart->setLabels(array("Jan", "Feb", "Mar", "Apr", "May")); $chart->addSeries("2013", "2013", array(1, 3, -1, 1, 9), array("seriesStacked" => true)); $chart->addSeries("2012", "2012", array(2, 1, -3, 3, 1), array("seriesStacked" => true)); $chart->setYAxis('Sales', array("numberPrefix" => '$', "numberHumanize" => true)); $chart->setOption("stackedTotalDisplay", true); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("my_first_chart"); $chart->setCaption("Expenses incurred on Food Consumption by Year"); $chart->setDimensions(6, 6); $chart->setLabels(["2009", "2010", "2011"]); $chart->addSeries("beverages", "Beverages", [13552, 19126, 12150]); $chart->addSeries("packaged_foods", "Packaged Foods", [13152, 13126, 14150]); $chart->addComponentKPI("total_sales", array('caption' => "Total Sales", 'value' => 41332, 'numberPrefix' => "\$")); $chart->addComponentKPI("total_profit", array('caption' => "Total Profit", 'value' => 31215, 'numberPrefix' => "\$", 'numberHumanize' => true, 'numberDecimalPoints' => 0)); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent(); $chart->setDimensions(8, 6); $chart->setYAxis("Sales", array("numberPrefix" => "\$ ", "numberHumanize" => true)); $chart->addYAxis('profit', "Profit %", array("numberSuffix" => "%")); $chart->setCaption("Showing monthly sales and profit of a retail company"); $chart->setLabels(array("March", "April", "May", "June", "July")); $chart->addSeries("product_A", "Product A", array(25601.34, 20148.82, 17372.76, 35407.15, 38105.68), array("numberPrefix" => '$', "seriesDisplayType" => 'column')); $chart->addSeries("product_B", "Product B", array(57401.85, 41941.19, 45263.37, 117320.16, 114845.27), array("numberPrefix" => '$', "seriesDisplayType" => 'column')); $chart->addSeries("profit", "Profit %", array(20, 42, 10, 23, 16), array("numberPrefix" => '$', "seriesDisplayType" => 'line', "yAxis" => "profit")); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent('chart'); $chart->setCaption("Visits from search engines"); $chart->setDimensions(8, 6); $chart->setLabels(["Jan", "Feb", "Mar", "Apr", "May", "Jun", "July", "Aug", "Sept", "Oct", "Nov", "Dec"]); $chart->setYAxis("", array("numberPrefix" => "\$")); $chart->addSeries("Google", "Google", [3040, 2794, 3026, 3341, 2800, 2507, 3701, 2671, 2980, 2041, 1813, 1691], array("seriesStacked" => true, "seriesDisplayType" => "column")); $chart->addSeries("Yahoo", "Yahoo", [1200, 1124, 1006, 921, 1500, 1007, 921, 971, 1080, 1041, 1113, 1091], array("seriesStacked" => true, "seriesDisplayType" => "column")); $chart->addSeries("MSN", "MSN", [600, 724, 806, 621, 700, 907, 821, 671, 880, 641, 913, 691], array("seriesStacked" => true, "seriesDisplayType" => "column")); $chart->addSeries("Others", "Others", [965, 771, 732, 611, 700, 607, 621, 751, 800, 741, 813, 791], array("seriesStacked" => true, "seriesDisplayType" => "column")); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent(); $chart->setCaption("Visits from search engines"); $chart->setDimensions(8, 6); $chart->setYAxis("Revenue", array("numberPrefix" => "\$ ", "numberHumanize" => true)); $chart->addYAxis('quantity', "Quantity", array()); $chart->setCaption("Sales"); $chart->setLabels(["March", "April", "May", "June", "July"]); $chart->addSeries("product_A", "Product A", [25601.34, 20148.82, 17372.76, 35407.15, 38105.68], array("numberPrefix" => '$', "seriesDisplayType" => 'column')); $chart->addSeries("product_B", "Product B", [57401.85, 41941.19, 45263.37, 117320.16, 114845.27], array("numberPrefix" => '$', "seriesDisplayType" => 'column')); $chart->addSeries("total_quantity", "Total Quantity", [45000, 44835, 42835, 77557, 92633], array("numberPrefix" => '$', "seriesDisplayType" => 'line', "yAxis" => "quantity")); $this->addComponent($chart); }
public function buildDashboard() { $sourceChart = new ChartComponent("sourceChart"); $sourceChart->setDimensions(4, 4); $sourceChart->setCaption("2011 Sales"); $sourceChart->setLabels(["Beverages", "Vegetables"]); $sourceChart->addSeries("sales", "Sales", [1343, 7741]); $sourceChart->addSeries("quantity", "Quantity", [76, 119]); $this->addComponent($sourceChart); $targetChart = new ChartComponent("targetChart"); $targetChart->hideComponent(); $this->addComponent($targetChart); $sourceChart->onItemClick(array($sourceChart, $targetChart), "handleItemClick", $this); }
public function buildDashboard() { $chart = new ChartComponent('dataChart'); $chart->setCaption("Compare data chart"); $monthList = array(); for ($m = 1; $m <= 12; $m++) { $monthList[] = date('M', mktime(0, 0, 0, $m, 1)); } $chart->setLabels($monthList); $chart->setDimensions(12, 6); $chart->addSeries("data_2013", "Data 2013", [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]); $chart->addSeries("data_2014", "Data 2014", [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]); $chart->addDrillStep("drill_Data", $this); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("Sales - 2013 v 2012"); $chart->setCaption("Sales - 2013 v 2012"); $chart->setDimensions(8, 6); $chart->setLabels(["Jan", "Feb", "Mar", "Apr", "May", "Jun", "July", "Aug", "Sept", "Oct", "Nov", "Dec"]); $chart->addSeries("2013", "2013", [22400, 24800, 21800, 21800, 24600, 27600, 26800, 27700, 23700, 25900, 26800, 24800]); $chart->addSeries("2012", "2012", [10000, 11500, 12500, 15000, 16000, 17600, 18800, 19700, 21700, 21900, 22900, 20800]); $chart->setYAxis('', array("numberPrefix" => '$', "numberHumanize" => true)); $chart->addComponentKPI('beverages', array('caption' => 'Beverages', 'value' => 559, 'numberSuffix' => ' units')); $chart->addComponentKPI('condiments', array('caption' => 'Condiments', 'value' => 507, 'numberSuffix' => ' units')); $chart->addComponentKPI('confections', array('caption' => 'Confections', 'value' => 386, 'numberSuffix' => ' units')); $chart->addComponentKPI('daily_products', array('caption' => 'Daily Products', 'value' => 393, 'numberSuffix' => ' units')); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent(); $chart->setCaption("Sales - 2013 vs 2012"); $chart->setDimensions(8, 6); $chart->setLabels(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "July", "Aug", "Sept", "Oct", "Nov", "Dec")); $chart->addSeries("sales2013", "2013", array(22400, 24800, 21800, 21800, 24600, 27600, 26800, 27700, 23700, 25900, 26800, 24800)); $chart->addSeries("sales2012", "2012", array(10000, 11500, 12500, 15000, 16000, 17600, 18800, 19700, 21700, 21900, 22900, 20800)); $chart->setYAxis('Sales', array("numberPrefix" => '$', "numberHumanize" => true)); $chart->addComponentKPI('beverages', array('caption' => 'Maximum sales in 2012', 'value' => 22900, 'numberPrefix' => '$', 'numberHumanize' => true)); $chart->addComponentKPI('condiments', array('caption' => 'Lowest sales in 2012', 'value' => 10000, 'numberPrefix' => '$', 'numberHumanize' => true)); $chart->addComponentKPI('confections', array('caption' => 'Maximum sales in 2013', 'value' => 27700, 'numberPrefix' => '$', 'numberHumanize' => true)); $chart->addComponentKPI('daily_products', array('caption' => 'Lowest sales in 2013', 'value' => 21800, 'numberPrefix' => '$', 'numberHumanize' => true)); $this->addComponent($chart); }
public function buildDashboard() { $chart = new ChartComponent("chart"); $chart->setCaption("Expenses incurred for Food Consumption by Year"); $chart->setDimensions(4, 4); $chart->setLabels(array("2009", "2010", "2011")); $chart->addSeries("beverages", "Beverages", [1355, 1916, 1150], array('numberPrefix' => '$')); $chart->addSeries("packaged_foods", "Packaged Foods", [1513, 976, 1321], array('numberPrefix' => '$')); $this->addComponent($chart); $kpi = new KPIComponent("kpi"); $kpi->setValue(0, array('numberPrefix' => '$')); $kpi->setDimensions(4, 4); $this->addComponent($kpi); $chart->onItemClick(array($kpi), 'handleClick', $this); }
public function buildDashboard() { $quarterlySales = new ChartComponent('quarterlySales'); $quarterlySales->setDimensions(6, 6); $quarterlySales->setCaption("Quarterly Sales"); $quarterlySales->setLabels(array("Q1", "Q2", "Q3", "Q4")); $quarterlySales->addYAxis('quantity', "Quantity"); $quarterlySales->addSeries('sales', "Sales", array(13122, 41312, 46132, 51135), array('numberPrefix' => "\$")); $quarterlySales->addSeries('quantity', "Quantity", array(121, 392, 420, 489), array('yAxis' => 'quantity')); $quarterlySales->addComponentKPI('beverage', array('caption' => 'Beverages', 'value' => 22900, 'numberPrefix' => ' $', 'numberHumanize' => true)); $quarterlySales->addComponentKPI('vegetable', array('caption' => 'Vegetables', 'value' => 10401, 'numberPrefix' => ' $', 'numberHumanize' => true)); $quarterlySales->addComponentKPI('dairy', array('caption' => 'Dairy', 'value' => 27700, 'numberPrefix' => ' $', 'numberHumanize' => true)); $quarterlySales->addDrillStep('drillIntoMonths', $this); $this->addComponent($quarterlySales); $numTickets = new KPIComponent('numTickets'); $numTickets->setDimensions(3, 3); $numTickets->setCaption("Open Support Tickets"); $numTickets->setValue(42); $this->addComponent($numTickets); $satisfactionGauge = new GaugeComponent('satisfactionGauge'); $satisfactionGauge->setDimensions(3, 3); $satisfactionGauge->setCaption('Customer Satisfaction'); $satisfactionGauge->setValue(8); $satisfactionGauge->setLimits(0, 10); $this->addComponent($satisfactionGauge); $ticketPriorities = new KPIGroupComponent('ticketPriorities'); $ticketPriorities->setDimensions(6, 3); $ticketPriorities->setCaption('Ticket Priorities'); $ticketPriorities->addKPI('high', array('caption' => 'High Priority', 'value' => 6)); $ticketPriorities->addKPI('normal', array('caption' => 'Normal Priority', 'value' => 36)); $this->addComponent($ticketPriorities); $productsTable = new TableComponent('productsTable'); $productsTable->setDimensions(6, 6); $productsTable->setCaption('Products'); $productsTable->addColumn('name', 'Name'); $productsTable->addColumn('category', 'Category'); $productsTable->addColumn('price', 'Price', array('dataType' => "number", 'numberPrefix' => "\$", 'textAlign' => "right", 'numberForceDecimals' => true)); $productsTable->addMultipleRows($this->tableData); $this->addComponent($productsTable); $productFilterForm = new FormComponent('productFilterForm'); $productFilterForm->setDimensions(6, 6); $productFilterForm->setCaption('Filter Products'); $productFilterForm->addMultiSelectField('category', 'Select Category', array('Vegetables', 'Dairy', 'Beverages')); $productFilterForm->addTextField('name', 'Product Name Contains'); $productFilterForm->addNumericRangeField('price', 'Price', array(5, 20)); $this->addComponent($productFilterForm); $productFilterForm->onApplyClick(array($productsTable), 'handleApplyClick', $this); }