<?php //The included Includes/DataEngine.php contains //functions to help easily embed the charts and connect to a database. include "Includes/DataEngine.php"; ?> <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text-html; charset=utf-8"/> <script type="text/javascript" src="../../JSC/jquery-latest.min.js"></script> <script type="text/javascript" src="../../JSC/JSCharting.js"></script> <?php $de = new DataEngine(); $de->addParameter(new DateTime('2013-03-01')); $de->addParameter(new DateTime('2013-05-01')); $de->sqlStatement = 'SELECT TransDate, HighPrice AS MSFT FROM MSFT WHERE TransDate >= ? AND TransDate <= ? ORDER BY TransDate'; $series = $de->getSeries(); ?> <title>JSCharting Navigator Axis Markers DB Chart</title> <style type="text/css">/*CSS*/</style> </head> <body> <div id="cc" style="width: 840px; height: 400px;"></div> <script type="text/javascript"> /* Query a Database using PHP to get a single series using date ranges. Learn how to:
//The included Includes/DataEngine.php contains //functions to help easily embed the charts and connect to a database. include "Includes/DataEngine.php"; ?> <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text-html; charset=utf-8"/> <script type="text/javascript" src="../../JSC/jquery-latest.min.js"></script> <script type="text/javascript" src="../../JSC/JSCharting.js"></script> <?php $startDate = new DateTime('2014-10-1'); $endDate = new DateTime('2014-10-31 23:59:59'); $title = 'Sales From ' . date_format($startDate, 'm/d/Y') . ' to ' . date_format($endDate, 'm/d/Y') . ', Total : %sum'; $de = new DataEngine(); $de->addParameter($startDate); $de->addParameter($endDate); $de->sqlStatement = 'SELECT OrderDate AS Month, SUM(Total) AS Sales FROM Orders WHERE OrderDate >=? And OrderDate <=? GROUP BY DAY(OrderDate) ORDER BY DAY(OrderDate);'; $de->dataFields = 'xAxis=Month,yAxis=Sales'; //default setting $de->dateGrouping = "Month"; $series = $de->getSeries(); ?> <title>JSCharting Month DB Chart</title> <style type="text/css">/*CSS*/</style> </head>
<?php //The included Includes/DataEngine.php contains //functions to help easily embed the charts and connect to a database. include "Includes/DataEngine.php"; ?> <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text-html; charset=utf-8"/> <script type="text/javascript" src="../../JSC/jquery-latest.min.js"></script> <script type="text/javascript" src="../../JSC/JSCharting.js"></script> <?php $de = new DataEngine(); $de->addParameter(new DateTime('2014-1-1')); $de->addParameter(new DateTime('2014-12-31 23:59:59')); $de->sqlStatement = 'SELECT MONTH(OrderDate) AS Month, SUM(1) AS Sales FROM Orders WHERE OrderDate >=? And OrderDate <=? GROUP BY MONTH(OrderDate)ORDER BY MONTH(OrderDate);'; //$de->dataFields = 'xAxis=Month,yAxis=Sales'; //default $series = $de->getSeries(); //Multiple series can be generated from different sqlStatement $de->sqlStatement = 'SELECT DatePeriod,Purchases As Costs FROM AreaData'; //$de->dataFields = 'xAxis=DatePeriod,yAxis=Costs'; //default $series = $de->getSeries(); //Multiple series can be generated from different sqlStatement $de->sqlStatement = 'SELECT DatePeriod,Purchases As Costs FROM AreaData'; //$de->dataFields = 'xAxis=DatePeriod,yAxis=Costs'; //default $series = $de->getSeries(); ?>
<?php //The included Includes/DataEngine.php contains //functions to help easily embed the charts and connect to a database. include "Includes/DataEngine.php"; ?> <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text-html; charset=utf-8"/> <script type="text/javascript" src="../../JSC/jquery-latest.min.js"></script> <script type="text/javascript" src="../../JSC/JSCharting.js"></script> <?php $de = new DataEngine(); $de->addParameter("Aida"); $de->addParameter("George"); $de->addParameter("Joe"); $de->addParameter("David"); $de->sqlStatement = 'SELECT id,name,salary,Location,phone,Picture FROM Employees where name =? or name =? or name =? or name =?'; $de->dataFields = 'xAxis=name,yAxis=id,Location=location,phone=phone,Picture=img'; $series = $de->getSeries(); ?> <title>JSCharting Custom Attributes DB Chart</title> <style type="text/css">.infoDiv{ vertical-align: top; top: -110px; position:relative; } .infoTable {
include "Includes/DataEngine.php"; ?> <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text-html; charset=utf-8"/> <script type="text/javascript" src="../../JSC/jquery-latest.min.js"></script> <script type="text/javascript" src="../../JSC/JSCharting.js"></script> <?php $startDate = new DateTime('2014-1-1'); $endDate = new DateTime('2014-12-31 23:59:59'); $title = 'Orders From ' . date_format($startDate, 'm/d/Y') . ' to ' . date_format($endDate, 'm/d/Y') . ', Total : %sum'; $de = new DataEngine(); //spSalesDateGroup stored procedure should be defined in your database with the following 3 parameters $de->storedProcedure = 'spSalesDateGroup'; $de->addParameter($startDate); $de->addParameter($endDate); $de->addParameter("MONTH"); $de->dataFields = 'xAxis=OrderDate,yAxis=Sales'; //default setting $series = $de->getSeries(); ?> <title>JSCharting Stored Procedure DB Chart</title> <style type="text/css">/*CSS*/</style> </head> <body> <div id="cc" style="width: 840px; height: 400px"></div> <script type="text/javascript">
<?php //The included Includes/DataEngine.php contains //functions to help easily embed the charts and connect to a database. include "Includes/DataEngine.php"; ?> <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text-html; charset=utf-8"/> <script type="text/javascript" src="../../JSC/jquery-latest.min.js"></script> <script type="text/javascript" src="../../JSC/JSCharting.js"></script> <?php $de = new DataEngine(); $de->addParameter(new DateTime('2013-01-01')); $de->addParameter(new DateTime('2014-05-25')); $de->sqlStatement = 'SELECT TransDate, HighPrice, LowPrice, OpenPrice, ClosePrice FROM MSFT WHERE TransDate >= ? AND TransDate <= ? ORDER BY TransDate'; $de->dataFields = 'xAxis=TransDate,High=HighPrice,Low=LowPrice,Open=OpenPrice,Close=ClosePrice'; $series = $de->getSeries(); ?> <title>JSCharting Navigator Large Data DB Chart</title> <style type="text/css">/*CSS*/</style> </head> <body> <div id="cc" style="width: 840px; height: 400px;"></div> <script type="text/javascript"> /* Query a Database using PHP to get OHLC financial data on a CandleStick chart.
<?php //The included Includes/DataEngine.php contains //functions to help easily embed the charts and connect to a database. include "Includes/DataEngine.php"; ?> <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text-html; charset=utf-8"/> <script type="text/javascript" src="../../JSC/jquery-latest.min.js"></script> <script type="text/javascript" src="../../JSC/JSCharting.js"></script> <?php $de = new DataEngine(); $de->addParameter(new DateTime('2014-01-01')); $de->addParameter(new DateTime('2014-2-01')); $de->sqlStatement = 'SELECT TransDate, HighPrice, LowPrice, OpenPrice, ClosePrice FROM MSFT WHERE TransDate >=? AND TransDate <=? ORDER BY TransDate'; $de->dataFields = 'xAxis=TransDate,High=HighPrice,Low=LowPrice,Open=OpenPrice,Close=ClosePrice'; $series = $de->getSeries(); ?> <title>JSCharting Finance Candle DB Chart</title> <style type="text/css">/*CSS*/</style> </head> <body> <div id="cc" style="width: 840px; height: 400px;"></div> <script type="text/javascript"> /* Query a Database using PHP to get OHLC financial data on a CandleStick chart.