' +
@@ -2411,7 +2410,7 @@
irradianceALL += val.irradiance;
prALL = val.pr;
tempALL += val.temp;
-
+
//暫時先執行到這--->取kwhkwp
if (val.length != 0) {
@@ -2436,14 +2435,14 @@
'
' + val.temp.toFixed(2) + ' | ' +
'');
listmonth.push(val.timestamp);
- listkwh.push(val.kwh.toFixed(2));
+ listkwh.push(parseFloat(val.kwh.toFixed(2)));
listcolor.push(color);
listcolor2.push(color2);
- listirradiance.push(val.irradiance.toFixed(2));
- listtemperature.push(val.temp.toFixed(2));
- listsolarhour.push(val.solarhour.toFixed(2));
- listpr.push(val.pr.toFixed(2));
- listkwhkwp.push(val.kwhkwp.toFixed(2));
+ listirradiance.push(parseFloat(val.irradiance.toFixed(2)));
+ listtemperature.push(parseFloat(val.temp.toFixed(2)));
+ listsolarhour.push(parseFloat(val.solarhour.toFixed(2)));
+ listpr.push(parseFloat(val.pr.toFixed(2)));
+ listkwhkwp.push(parseFloat(val.kwhkwp.toFixed(2)));
}
else
{
@@ -2466,14 +2465,14 @@
'
' + val.temp.toFixed(2) + ' | ' +
'');
listmonth.push(val.timestamp);
- listkwh.push(val.kwh.toFixed(2));
+ listkwh.push(parseFloat(val.kwh.toFixed(2)));
listcolor.push(color);
listcolor2.push(color2);
- listirradiance.push(val.irradiance.toFixed(2));
- listtemperature.push(val.temp.toFixed(2));
- listsolarhour.push(val.solarhour.toFixed(2));
- listpr.push(val.pr.toFixed(2));
- listkwhkwp.push(val.kwhkwp.toFixed(2));
+ listirradiance.push(parseFloat(val.irradiance.toFixed(2)));
+ listtemperature.push(parseFloat(val.temp.toFixed(2)));
+ listsolarhour.push(parseFloat(val.solarhour.toFixed(2)));
+ listpr.push(parseFloat(val.pr.toFixed(2)));
+ listkwhkwp.push(parseFloat(val.kwhkwp.toFixed(2)));
}
@@ -2484,7 +2483,105 @@
tempALL = tempALL / rel.data.length;
+
$('#history-kWh-convas-div').empty();
+ $('#history-kWh-convas-div').append('
');
+ chart = new Highcharts.Chart({
+ lang: { //匯出相關中文名稱配置
+ printChart: '列印圖表',
+ downloadJPEG: '下載JPEG檔案',
+ downloadPDF: '下載PDF檔案',
+ downloadPNG: '下載PNG檔案',
+ downloadSVG: '下載SVG檔案',
+ downloadCSV: '下載CSV檔案',
+ downloadXLS: '下載XLS檔案',
+ viewData: '檢視資料表格',
+ viewFullscreen: '全屏檢視'
+ },
+ chart: {
+ renderTo: 'history-kWh',
+ height: 600,
+ animation: false
+ },
+ title: {
+ text: '發電量及日照度'
+ },
+ xAxis: {
+ categories: listmonth,
+ },
+ yAxis: [{
+ title: {
+ text: "kWh"
+ },
+ id: "A",
+ opposite: false,
+ showEmpty: false
+ }, {
+ title: {
+ text: "kWh/㎡"
+ },
+ id: "B",
+ opposite: true,
+ showEmpty: false
+ }, {
+ title: {
+ text: "hr"
+ },
+ id: "C",
+ opposite: true,
+ showEmpty: false
+ }, {
+ title: {
+ text: "PR(%)"
+ },
+ id: "D",
+ opposite: true,
+ showEmpty: false
+ }, {
+ title: {
+ text: "溫度(℃)"
+ },
+ id: "E",
+ opposite: true,
+ showEmpty: false
+ }],
+
+ series: [{
+ type: 'spline',
+ name: "溫度(℃)",
+ data: listtemperature,
+ yAxis: "E",
+ color: "rgb(255, 192, 0)",
+ zIndex: 4
+ }, {
+ type: 'spline',
+ name: "日照度(kWh/㎡)",
+ data: listirradiance,
+ yAxis: "B",
+ color: "rgb(190, 45, 45)",
+ zIndex: 3
+ }, {
+ type: 'column',
+ name: "PR(%)",
+ data: listpr,
+ yAxis: "D",
+ color: 'rgb(68, 114, 196)'
+ }, {
+ type: 'column',
+ name: "有效日照時數",
+ data: listkwhkwp,
+ yAxis: "C",
+ color: "rgb(165, 165, 165)"
+ }, {
+ type: 'column',
+ name: "發電量(kWh)",
+ data: listkwh,
+ yAxis: "A",
+ color: "rgb(103, 180, 172)"
+ }],
+ });
+
+ @*$('#history-kWh-convas-div').empty();
$('#history-kWh-convas-div').append('
');
var ctx_history_kWh = document.getElementById('history-kWh').getContext('2d');
var myhistorykwh = new Chart(ctx_history_kWh, {
@@ -2609,7 +2706,7 @@
}]
}
}
- });
+ });*@
@@ -2672,7 +2769,7 @@
var urlPath = "../upload/power_station/" + rel.data.id + "/" + rel.data.mainDisplay;
- var xmlhttp;
+ var xmlhttp;
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();//其他浏览器
}
@@ -2886,7 +2983,7 @@
ACDetail += "";
}
ACDetail += "
";
- ACDetail += "| 輸出功率 " + ((rel.data.aC1W + rel.data.aC2W + rel.data.aC3W) / 1000).toFixed(2) + " KW | ";
+ ACDetail += "輸出功率 " + ((rel.data.aC1W + rel.data.aC2W + rel.data.aC3W) / 1000).toFixed(2) + " KW | ";
ACDetail += "
";
ACDetail += "
";
ACDetail += "| PR " + rel.data.pr.toFixed(2) + " % | ";
@@ -2925,7 +3022,7 @@
})
-
+
}