Selaa lähdekoodia

fixed setting btn

andy 4 kuukautta sitten
vanhempi
commit
367438457e
1 muutettua tiedostoa jossa 10 lisäystä ja 2 poistoa
  1. 10 2
      js/demo/text-to-chart.js

+ 10 - 2
js/demo/text-to-chart.js

@@ -1061,7 +1061,7 @@ chartTypeBtn.addEventListener('change', function () {
             labels = [];
             labels = [];
             myChart.destroy();
             myChart.destroy();
         }
         }
-
+        sidebar.classList.add('hidden');
         generateChart(dataArray);
         generateChart(dataArray);
 
 
     } else if (selectedValue === 'bar') {
     } else if (selectedValue === 'bar') {
@@ -1070,7 +1070,7 @@ chartTypeBtn.addEventListener('change', function () {
         $('#textToChart').hide();
         $('#textToChart').hide();
         // 处理柱状图
         // 处理柱状图
         console.log('處理柱狀圖', dataArray);
         console.log('處理柱狀圖', dataArray);
-
+        sidebar.classList.add('hidden');
         extractAndGenerateChart(dataArray);
         extractAndGenerateChart(dataArray);
     } else if (selectedValue === 'doughnut') {
     } else if (selectedValue === 'doughnut') {
         chartType = 'doughnut';
         chartType = 'doughnut';
@@ -1078,6 +1078,7 @@ chartTypeBtn.addEventListener('change', function () {
         console.log('處理圓餅圖', dataArray);
         console.log('處理圓餅圖', dataArray);
         unit_value.textContent = "";
         unit_value.textContent = "";
         $('#textToChart').hide();
         $('#textToChart').hide();
+        sidebar.classList.add('hidden');
 
 
         generatePieChart(dataArray, pieFontSize, PieMaxWidth)
         generatePieChart(dataArray, pieFontSize, PieMaxWidth)
         // 处理圆饼图
         // 处理圆饼图
@@ -1489,6 +1490,13 @@ function createChart(chartType, data, labels) {
         pointHoverRadiusValue = 8;
         pointHoverRadiusValue = 8;
 
 
         togglePoints.checked = true;
         togglePoints.checked = true;
+        toggleValue.checked = true;
+
+
+    } else {
+        togglePoints.checked = false;
+
+        toggleValue.checked = false;
     }
     }