douzhui1972 2015-05-19 14:41
浏览 16

我的一个包含不起作用

<?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'); ?>

the overtime.php will not work, but if I switch it to another position it will it's just anything that I place in that spot will not show. Now all of them will work individually it's just when I try It like this it does not on that one area

enter image description here

the blank section is what is missing

 <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>

here is the code that I have for it

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 微信会员卡接入微信支付商户号收款
    • ¥15 如何获取烟草零售终端数据
    • ¥15 数学建模招标中位数问题
    • ¥15 phython路径名过长报错 不知道什么问题
    • ¥15 深度学习中模型转换该怎么实现
    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向
    • ¥15 如何用python向钉钉机器人发送可以放大的图片?