Kaynağa Gözat

SIS SID 轉置

manto07m 3 yıl önce
ebeveyn
işleme
fd23e6c463
1 değiştirilmiş dosya ile 4 ekleme ve 45 silme
  1. 4 45
      script/js/r03.js

+ 4 - 45
script/js/r03.js

@@ -413,9 +413,6 @@ function displayChart(monitor, label, unit, charts) {
     var warning2 = [];
     var action2 = [];
     var type = monitor.split("-")[0];
-
-
-    var SIS = [];
     var SIS_data = {};
 
     if (window.chart != undefined) {
@@ -503,14 +500,15 @@ function displayChart(monitor, label, unit, charts) {
                 spanGaps: true,
                 maintainAspectRatio: false,
                 responsive: true,
+                indexAxis: 'y',
                 scales: {
-                    x: {
+                    y: {
                         title: {
                             display: true,
-                            text: "深度"
+                            text: "觀測深度(m)"
                         }
                     },
-                    y: {
+                    x: {
                         title: {
                             display: true,
                             text: label + '(' + unit + ')'
@@ -623,45 +621,6 @@ function displayChart(monitor, label, unit, charts) {
         });
     }
 }
-/*
-function displayCompareChart() {
-    var option = window.localStorage.getItem("option");
-    var m_date = [];
-    var label = [];
-    var index = 7;
-    if (option == "ELP")
-        index = 14;
-    var chart_data = new Array();
-    for (var i = 0; i < index; i++) {
-        chart_data[i] = new Array();
-        for (var j = 0; j < m_date.length; j++) {
-            chart_data[i][j] = 0;
-        }
-    }
-    $.ajax({
-            url: "/BIM-Monitor/script/php/getCompareChartData.php",
-            async: false,
-            contentType: "application/json",
-            dataType: "json",
-            data: {
-                option: option
-            }
-        })
-
-        .success(function (response) {
-            m_date = response['m_date'];
-            chart_data = response['chart_data'];
-            label = response['label'];
-            initCompare(m_date, chart_data, index, label);
-            console.log("getCompareChartData正常獲取");
-        })
-        .error(function () {
-            console.log("getCompareChartData未正常獲取");
-        })
-        .complete(function () {});
-
-}
-*/
 
 function ResetCamera() {
     if (isLoad) {