Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 public function buildDashboard()
 {
     $kpi1 = new KPIComponent("kpi1");
     $kpi1->setCaption("Number of checkouts in 24h");
     $kpi1->setDimensions(3, 2);
     $kpi1->setValue(rand(100, 500));
     $this->addComponent($kpi1);
     $kpi2 = new KPIComponent("kpi2");
     $kpi2->setCaption("Sales in last 24h");
     $kpi2->setDimensions(3, 2);
     $kpi2->setValue(rand(10, 50), array('numberPrefix' => '$'));
     $this->addComponent($kpi2);
     $kpi3 = new KPIComponent("kpi3");
     $kpi3->setCaption("Number of checkouts this week");
     $kpi3->setDimensions(3, 2);
     $kpi3->setValue(rand(600, 1000));
     $this->addComponent($kpi3);
     $kpi4 = new KPIComponent("kpi4");
     $kpi4->setCaption("Total sales this week");
     $kpi4->setDimensions(3, 2);
     $kpi4->setValue(rand(100, 300), array('numberPrefix' => '$'));
     $this->addComponent($kpi4);
     $chart3 = new ChartComponent("chart3");
     $chart3->setCaption("Gender distribution of shoppers");
     $chart3->setDimensions(6, 6);
     $chart3->setLabels(['Female', 'Male']);
     $chart3->addSeries('gender', 'Gender', array(rand(0, 100), rand(0, 100)), array('seriesDisplayType' => 'pie'));
     $this->addComponent($chart3);
     $chart4 = new ChartComponent("chart4");
     $chart4->setCaption("Age group of shoppers");
     $chart4->setDimensions(6, 6);
     $chart4->setLabels(['Under 15', '15-30', '30-45', '45-60', '60+']);
     $chart4->addSeries('age', 'Age', array(rand(1, 10), rand(20, 30), rand(30, 40), rand(20, 30), rand(1, 10)), array('seriesDisplayType' => 'column'));
     $this->addComponent($chart4);
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
 public function buildDashboard()
 {
     $chart = new ChartComponent();
     $chart->setCaption("Expenditures Incurred in Publishing a Book");
     $chart->setDimensions(8, 6);
     $chart->setLabels(["Paper Cost", "Binding", "Printing Cost", "Royality", "Transportation Cost", "Promotion Cost"]);
     $chart->setPieValues([25, 20, 20, 15, 10, 10]);
     $this->addComponent($chart);
 }
Esempio n. 5
0
 public function buildDashboard()
 {
     $chart = new ChartComponent("pie_chart");
     $chart->setCaption("Monthly Unit Distribution");
     $chart->setDimensions(4, 4);
     $chart->setLabels(["Jan", "Feb", "Mar"]);
     $chart->setPieValues([10, 14, 13]);
     $this->addComponent($chart);
 }
Esempio n. 6
0
 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);
 }
Esempio n. 7
0
 public function buildDashboard()
 {
     $chart1 = new ChartComponent('c');
     $chart1->setDimensions(6, 4);
     $chart1->setCaption('Top 10 Genres by sales');
     $chart1->setLabels(['Rock', 'Latin', 'Metal', 'Alternative & Punk', 'TV Shows', 'Jazz', 'Blues', 'Drama', 'R&B/Soul', 'Classical']);
     $chart1->addSeries('sales', 'Ȁ ȁ Ȃ ȃ Ȅ ȅ Ȇ ȇ Ȉ ȉ Ȋ ȋ Ȍ ȍ Ȏ ȏ Ȑ ȑ Ȓ ȓ Ȕ ȕ Ȗ ȗ Ș ș Ț ț Ȝ ȝ Ȟ ȟ', [826.25, 382.14, 261.36, 241.56, 93.53, 79.2, 60.39, 57.71, 40.59, 40.59]);
     $chart1->setYAxis('', array('numberPrefix' => '$'));
     $this->addComponent($chart1);
 }
 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);
 }
Esempio n. 10
0
 public function buildDashboard()
 {
     $chart = new ChartComponent('chart');
     $chart->setCaption("Visits by Month");
     $chart->setDimensions(8, 6);
     $chart->setLabels(["Jan", "Feb", "Mar", "Apr", "May", "Jun", "July", "Aug", "Sept", "Oct", "Nov", "Dec"]);
     $chart->addSeries("2013", "2013", [420000, 460000, 480000, 520000, 560000, 510000, 470000, 430000, 420000, 370000, 360000, 360000], array("seriesDisplayType" => "area"));
     $chart->setYAxis('', array("numberPrefix" => '$', "numberHumanize" => true));
     $this->addComponent($chart);
 }
Esempio n. 11
0
 public function buildDashboard()
 {
     $chart = new ChartComponent('chart');
     $chart->setCaption("Number of monthly unique visitors on a website in 2013");
     $chart->setDimensions(8, 6);
     $chart->setLabels(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "July", "Aug", "Sept", "Oct", "Nov", "Dec"));
     $chart->addSeries("sales_2013", "2013", array(420000, 460000, 480000, 520000, 560000, 510000, 470000, 430000, 420000, 370000, 360000, 360000), array("seriesDisplayType" => "area"));
     $chart->setYAxis('Number of visitors', array("numberPrefix" => '$', "numberHumanize" => true));
     $this->addComponent($chart);
 }
Esempio n. 12
0
 public function buildDashboard()
 {
     $chart = new ChartComponent('chart');
     $chart->setCaption("No Labels");
     $chart->setDimensions(2, 2);
     $chart->setLabels(array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q'));
     $chart->addSeries("seriesA", "Series A", [1, 3, 5, 1, 9, 3, 5, 1, 9, 3, 5, 1, 9, 1, 2, 3, 1], array('seriesDisplayType' => 'line', 'numberPrefix' => '$'));
     $chart->setOption('showLabelFlag', false);
     $this->addComponent($chart);
 }
Esempio n. 13
0
 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);
 }
Esempio n. 14
0
 public function buildDashboard()
 {
     $c2 = new ChartComponent('b');
     $c2->setDimensions(6, 4);
     $c2->setCaption('Units By Year');
     $c2->setLabels(['2007', '2008', '2009', '2010', '2011']);
     $c2->addSeries('units', 'Units', [454, 455, 236, 195, 442], array('seriesDisplayType' => 'line'));
     $c2->addTrendLine(250, "Average");
     $this->addComponent($c2);
 }
Esempio n. 15
0
 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);
 }
Esempio n. 16
0
 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);
 }
Esempio n. 17
0
 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);
 }
Esempio n. 18
0
 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);
 }
Esempio n. 19
0
 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);
 }
Esempio n. 20
0
 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);
 }
Esempio n. 21
0
 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);
 }
Esempio n. 22
0
 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);
 }
Esempio n. 23
0
 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);
 }
Esempio n. 24
0
 public function buildDashboard()
 {
     $chart = new ChartComponent("chart1");
     $chart->setCaption("Country wide sales");
     $chart->setLabels(["Country A", "Country B", "Country C"]);
     $chart->setDimensions(6, 6);
     $chart->addSeries("sales", "Sales", [10, 7, 11]);
     $chart->addDrillStep("drill_states", $this);
     $chart->addDrillStep("drill_countries", $this);
     $this->addComponent($chart);
 }
Esempio n. 25
0
 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);
 }
Esempio n. 26
0
 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);
 }
Esempio n. 27
0
 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("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);
 }
Esempio n. 29
0
 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);
 }