<?php include ('doorrate.php'); ?>
<br />
<?php include ('shopbudget.php'); ?>
<br />
<?php include ('Graph_DLH.php'); ?>
<br />
<?php include ('overtime.php'); ?>
<br />
<?php include ('warranty.php'); ?>
overtime.php将不起作用,但如果我将其切换到另一个位置,那么我将放置在该位置的任何内容都不会显示。现在所有这些都将单独工作,就在我尝试它时,它不会在那个区域
空白部分是缺少的
<html>
<head>
<script type="text/javascript" src="../scripts/jquery.canvasjs.min.js"></script>
<script type="text/javascript" src="../scripts/canvasjs.min.js"></script>
<script type="text/javascript" src="../scripts/jquery-2.1.3.js"></script>
<script type="text/javascript" src="../scripts/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="../CustomScripts.js"></script>
<link rel="stylesheet" href="StyleSheet1.css"/>
<meta name="viewport" content="width=device-width, maximum-scale=3, minimum-scale=0.5" />
<?php
//echo"{<script type=\"text/javascript\">
// window.onload = function () {
// var chart = new CanvasJS.Chart(\"chartContainer1\", {
// title: {
// text: \"Adding & Updating dataPoints\"
// },
// data: [
// {
// type: \"spline\",
// dataPoints: [
// { y: 0.8109, label: \"April, 4, 2015\"},
// { y: 0.7687, label: \"April, 11, 2015\" },
// { y: 0.8223, label: \"April, 18, 2015\" },
// { y: 0.7832, label: \"April, 25, 2015\" }
// ]
// }
// ]
// });
// chart.render();
// }
//</script>"
?>
</head>
<body>
<div id="chartContainer1" style="height:35%; width: 100%; font-size:8px;"></div>
</body>
</html>
<?php
$data_points= array();
$results= "WITH MYTAB1 AS(
SELECT ITEM_NBR, LOCATION ,ITEM_DATE
FROM IEGAR.KPI_FOREMAN_HIST
WHERE ITEM_NBR=1100
AND LOCATION='CHIIL'
ORDER BY 3 DESC
FETCH FIRST 13 ROWS ONLY
)
SELECT H.ITEM_NBR, H.ITEM_DATE, H.LOCATION
, H.ITEM_VALUE, H.KPI_COMMENT, H.CALC_DEF
FROM IEGAR.KPI_FOREMAN_HIST H
INNER JOIN MYTAB1 M ON H.ITEM_NBR=M.ITEM_NBR
AND H.LOCATION =M.LOCATION
AND H.ITEM_DATE=M.ITEM_DATE
order by 2
WITH UR";
$result=odbc_exec($bips, $results);
//ITEM_DATE,ITEM_VALUE...?=LOCATION
while($row= odbc_fetch_array($result))
{
if($row['ITEM_DATE'] != null){
//echo $row['ITEM_DATE'];
//echo $row['ITEM_VALUE'];
$point = array(label => $row['ITEM_DATE'], y => $row['ITEM_VALUE']*100);
array_push($data_points, $point);
}
else
{
echo $point = array("label" => "ITEM_NBR", "y" => 0);
array_push($data_points, $point);
}
}
//$display=json_encode($data_points, JSON_NUMERIC_CHECK);
// echo $display;
//echo json_encode($data_points);
odbc_close($bips);
?>
<script type="text/javascript">
window.onload = function () {
//$(document).ready(function () {
//$.getJSON("Graph_DLH.php", function (result) {
//chart.options.data[0].dataPoints = result;
var chart = new CanvasJS.Chart("chartContainer2", {
axisY: {
title: "Percentage",
},
data: [
{
type: "column",
color: "#A8422A",
dataPoints:
[
{ y: 0.70, label: "Mar-14" },
{ y: 2.54, label: "Apr-14" },
{ y: 3.26, label: "May-14" },
{ y: 0.19, label: "June-14" },
{ y: 4.00, label: "July-14" },
{ y: 0.32, label: "Aug-14" },
{ y: 0.08, label: "Sep-14" },
{ y: 0.16, label: "Oct-14" },
{ y: 0.24, label: "Nov-14" },
{ y: 2.85, label: "Dec-14" },
{ y: 0.74, label: "Jan-15" },
{ y: 0.31, label: "Feb-15" },
{ y: 1.16, label: "Mar-15" }]
}
],
legend: {
cursor: "pointer",
itemclick: function (e) {
if (typeof (e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {
e.dataSeries.visible = false;
} else {
e.dataSeries.visible = true;
}
chart32.render();
}
}
});
chart.render();
//});
};
//});
</script>
<body>
<div id="chartContainer2" style="height: 30%; width: 90%; font-size:8px;"></div>
</body>
<script type="text/javascript">
window.onload = function () {
//$(document).ready(function () {
//$.getJSON("Graph_DLH.php", function (result) {
//chart.options.data[0].dataPoints = result;
var chart = new CanvasJS.Chart("chartContainer3", {
title: {
text: "Warranty Chargeback & Rejections"
},
animationEnabled: true,
axisX: {
interval: 1,
labelFontSize: 10,
lineThickness: 0
},
axisY2: {
FontSize: 14,
valueFormatString: "$ 0",
lineThickness: 0
},
toolTip: {
shared: true
},
legend: {
verticalAlign: "top",
horizontalAlign: "center"
},
data: [
{
type: "stackedBar",
showInLegend: true,
name: "Chargeback amount",
axisYType: "secondary",
color: "#A8422A",
dataPoints:
[
{ y: 1810, label: "Mar-14" },
{ y: 2222, label: "Apr-14" },
{ y: 637, label: "May-14" },
{ y: 541, label: "June-14" },
{ y: 3446, label: "July-14" },
{ y: 956, label: "Aug-14" },
{ y: 429, label: "Sep-14" },
{ y: 3589, label: "Oct-14" },
{ y: 1789, label: "Nov-14" },
{ y: 2594, label: "Dec-14" },
{ y: 1206, label: "Jan-15" },
{ y: 899, label: "Feb-15" },
{ y: 3138, label: "Mar-15" }]
}
],
legend: {
cursor: "pointer",
itemclick: function (e) {
if (typeof (e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {
e.dataSeries.visible = false;
} else {
e.dataSeries.visible = true;
}
chart22.render();
}
}
});
chart.render();
//});
};
//});
</script>
<body>
<div id="chartContainer3" style="height: 30%; width: 80%; padding-right:15%"></div>
</body>
这是我的代码