diff --git a/Frontend/_dashboard.html b/Frontend/_dashboard.html index ef63b61..0f9f2ec 100644 --- a/Frontend/_dashboard.html +++ b/Frontend/_dashboard.html @@ -199,7 +199,7 @@ class="panel" style="height: calc(100% - 1.5rem)">
-

即時契約容量占比 - 第一校區

+

即時契約容量占比 - 第一校區 --

@@ -211,7 +211,7 @@ class="panel" style="height: calc(100% - 1.5rem)">
-

即時契約容量占比 - 第二校區

+

即時契約容量占比 - 第二校區 --

@@ -469,9 +469,11 @@ ({ point_name }) => point_name === "Capacity" )?.value; } + $("#contractCapacityForArea1").text(` (${contractCapacityForchart1} kW)`); chartContractValue( "contractValueChart", - ((value / contractCapacityForchart1) * 100).roundDecimal(2) + Math.round((value / contractCapacityForchart1) * 100), + value ); } else if (value && compus === "Area2") { if (data.some(({ point_name }) => point_name === "Capacity")) { @@ -479,9 +481,11 @@ ({ point_name }) => point_name === "Capacity" )?.value; } + $("#contractCapacityForArea2").text(` (${contractCapacityForchart2} kW)`); chartContractValue( "contractValueChart2", - ((value / contractCapacityForchart2) * 100).roundDecimal(2) + Math.round((value / contractCapacityForchart2) * 100), + value ); } }); @@ -1121,7 +1125,7 @@ } // 圖表 - 取得契約容量 - function chartContractValue(ele, value) { + function chartContractValue(ele, value, pValue) { var chartDom = document.getElementById(ele); contractValueChart = echarts.init(chartDom, null, { renderer: "canvas", @@ -1132,6 +1136,9 @@ series: [ { type: "gauge", + //startAngle: 180, + //endAngle: 0, + //center: ['50%', '60%'], axisLine: { lineStyle: { width: 30, @@ -1171,13 +1178,13 @@ }, detail: { valueAnimation: true, - formatter: "{value} %", + formatter: (value) => { return `\t\n ${value} % \t\n ${Math.round(pValue)} kW` }, color: "inherit", fontSize: 20, }, data: [ { - value, + value }, ], }, diff --git a/Frontend/_historyData.html b/Frontend/_historyData.html index 31c112e..04b2d01 100644 --- a/Frontend/_historyData.html +++ b/Frontend/_historyData.html @@ -69,7 +69,7 @@ type="date" name="date" value="" /> - @@ -120,6 +120,7 @@ hisFirst = true; $(function () { flatpickr(".selectDate", {}); + flatpickr(".selectMonth", { dateFormat: "Y-m", }); let html = ""; for (let building of pageAct.buildList) { html += `