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(); $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() { $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("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("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); $chart->setOption("breadcrumbStartString", "go go go"); $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("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("my_first_chart"); $chart->setCaption("Car Sales figures"); $chart->setYAxis("Sales", array("numberPrefix" => "\$", "numberHumanize" => true)); $chart->addYAxis("quantity", "Quantity", array()); $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("yAxis" => "quantity")); $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() { $chart1 = new ChartComponent('my_chart1'); $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', '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' => '$')); $c2 = new ChartComponent('my_chart2'); $c2->setDimensions(6, 4); $c2->setCaption('Units By Year'); $c2->hideComponent(); $chart1->onItemClick(array($chart1, $c2), 'handleClick', $this); $this->addComponent($chart1); $this->addComponent($c2); }
public function buildDashboard() { $chart = new ChartComponent('chart'); $chart->setDimensions(8, 6); $chart->setCaption('Annual Sales Summary (2010 - 2013'); $chart->setLabels(['2010', '2011', '2012', '2013']); $chart->addSeries('sales', 'Sales', [1160000, 1040000, 1020000, 1160000]); $chart->setYAxis('', array('numberPrefix' => '$', 'numberHumanize' => true)); $selectedYear; $chart->addDrillStep('firstDrill', $this); $chart->addDrillStep('secondDrill', $this); $this->addComponent($chart); }
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() { $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(); $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("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() { $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(); $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("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("pie_chart"); $chart->setCaption("Monthly Unit Distribution"); $chart->setDimensions(4, 4); $chart->setLabels(["Jan", "Feb", "Mar"]); $chart->setOption('showPieValues', false); $chart->setPieValues([10, 14, 13]); $this->addComponent($chart); }
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("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("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 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('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); }
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() { $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); }
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); }
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); }