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);
 }
Exemple #2
0
 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()
 {
     $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->setOption("showLegendFlag", false);
     $this->addComponent($chart);
 }
Exemple #4
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);
 }
 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("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);
 }
Exemple #7
0
<?php

require_once "rf/razorflow.php";
require_once "models/config.php";
if (!securePage($_SERVER['PHP_SELF'])) {
    die;
}
require_once "models/header.php";
//Left Nav bar
echo "\r\n<body>\r\n<div id='wrapper'>\r\n<div id='top'><div id='logo'></div></div>\r\n<div id='content'>\r\n\r\n<div id='left-nav'>";
include "left-nav.php";
//Main Content
echo "\r\n</div>\r\n<div id='main'>\r\n";
$dataSource = new MySQLDataSource('2013teamb', '2013teamb', '29G8l!06J82ofpPw', 'devdb.fulgentcorp.com');
$dataSource->setSQLSource('Item');
// Create a chart to show aggregated sales by genre
$itemPriority = new ChartComponent();
$itemPriority->setCaption("Item Priority");
$itemPriority->setDataSource($dataSource);
$itemPriority->setLabelExpression("Name", "Item.ItemName");
$itemPriority->addSeries("Priority", "Item.Priority");
$itemPriority->setOption('limit', 10);
Dashboard::addComponent($itemPriority);
Dashboard::Render();
echo "\r\n</div>\r\n\r\n\r\n<div id='bottom'></div>\r\n</div>\r\n</body>\r\n</html>";
Exemple #8
0
$dataSource = RFUtil::getSampleDataSource();
// Create a chart to show aggregated sales by genre
$genreSales = new ChartComponent();
$genreSales->setCaption("Genre Sales");
$genreSales->setDataSource($dataSource);
$genreSales->setLabelExpression("Genre", "genre.Name");
$genreSales->addSeries("Sales", "track.UnitPrice * invoiceline.Quantity", array('sort' => "DESC"));
$genreSales->setOption('limit', 10);
Dashboard::addComponent($genreSales);
// Create a chart to show aggregated sales by artist
$artistSales = new ChartComponent();
$artistSales->setCaption("Artist Sales");
$artistSales->setDataSource($dataSource);
$artistSales->setLabelExpression("Artist", "artist.Name");
$artistSales->addSeries("Sales", "track.UnitPrice * invoiceline.Quantity", array('sort' => "DESC"));
$artistSales->setOption('limit', 10);
Dashboard::addComponent($artistSales);
// Link the artist chart to artist sales
$genreSales->autoLink($artistSales);
// Create a table component to show each sale.
$saleTable = new TableComponent();
$saleTable->setCaption("Sales Table");
$saleTable->setWidth(3);
$saleTable->setDataSource($dataSource);
$saleTable->addColumn("Track", "track.Name");
$saleTable->addColumn("Album", "album.Title");
$saleTable->addColumn("Sale Date", "invoice.InvoiceDate", array('width' => 50));
$saleTable->addColumn("Amount", "track.UnitPrice * invoiceLine.Quantity", array('width' => 50, 'textAlign' => 'right', 'numberPrefix' => '$'));
Dashboard::addComponent($saleTable);
// Link the artist chart to the sales table
$artistSales->autoLink($saleTable);