Created At: 2026-06-14T15:49:32Z
Completed At: 2026-06-14T15:49:32Z
File Path: `file:///c:/Users/HP/Downloads/climate-system/climate-system/index.php`
Total Lines: 4761
Total Bytes: 203898
Showing lines 2600 to 2700
The following code has been modified to include a line number before every line, in the format: <line_number>: <original_line>. Please note that any changes targeting the original code should remove the line number, colon, and leading space.
2600:           document.getElementById('historicalSetImage').value = d.imageAnnual || '';
2601:           document.getElementById('historicalSetImageTrend').value = d.imageTrend || '';
2602:           document.getElementById('historicalSetImageTimeSeries').value = d.imageTimeSeries || '';
2603:           document.getElementById('historicalSetImageMonthlyMap').value = d.imageMonthlyMap || '';
2604:           document.getElementById('historicalSetImageMonthlyGraph').value = d.imageMonthlyGraph || '';
2605:         } else {
2606:           // Clear inputs if no data exists
2607:           document.getElementById('historicalSetDescription').value = '';
2608:           document.getElementById('historicalSetImage').value = '';
2609:           document.getElementById('historicalSetImageTrend').value = '';
2610:           document.getElementById('historicalSetImageTimeSeries').value = '';
2611:           document.getElementById('historicalSetImageMonthlyMap').value = '';
2612:           document.getElementById('historicalSetImageMonthlyGraph').value = '';
2613:         }
2614:       } catch (err) {
2615:         console.error(err);
2616:       }
2617:     }
2618: 
2619:     // Mengirim data baru Historical Climate ke backend (settings)
2620:     async function saveHistoricalData() {
2621:       const lokasi = document.getElementById('historicalSetLocation').value.trim();
2622:       const variable = document.getElementById('historicalSetVariable').value.trim();
2623:       const description = document.getElementById('historicalSetDescription').value.trim();
2624:       c
<truncated 1791 bytes>
  }
2663:       } catch (err) {
2664:         console.error(err);
2665:         alert('Gagal mengirim data penyimpanan ke server.');
2666:       }
2667:     }
2668: 
2669:     // Global chart instance to avoid "Canvas is already in use" error in Chart.js
2670:     let futureClimateChart = null;
2671:     let futureCSVChart = null;
2672:     let settingsFutureClimateChart = null;
2673:     let settingsFutureCSVChart = null;
2674: 
2675:     // Fungsi menggambar grafik Time Series interaktif dari data CSV dengan Uncertainty Shading ala IPCC
2676:     function renderFutureCSVChart(payload, variableName, statistic, startYear, endYear, periodRange = null, canvasId = 'futureChartCanvas') {
2677:       const canvas = document.getElementById(canvasId);
2678:       if (!canvas) return;
2679: 
2680:       const isMain = (canvasId === 'futureChartCanvas');
2681: 
2682:       if (isMain) {
2683:         const container = document.getElementById('futureInteractiveChartContainer');
2684:         if (container) container.style.display = 'block';
2685: 
2686:         // Sembunyikan legenda manual overlay karena Highcharts punya legenda sendiri
2687:         const legendOverlay = document.getElementById('futureChartLegendOverlay');
2688:         if (legendOverlay) legendOverlay.style.display = 'none';
2689: 
2690:         if (futureCSVChart && typeof futureCSVChart.destroy === 'function') {
2691:           futureCSVChart.destroy();
2692:           futureCSVChart = null;
2693:         }
2694:         if (futureClimateChart && typeof futureClimateChart.destroy === 'function') {
2695:           futureClimateChart.destroy();
2696:           futureClimateChart = null;
2697:         }
2698:       } else {
2699:         if (settingsFutureCSVChart && typeof settingsFutureCSVChart.destroy === 'function') {
2700:           settingsFutureCSVChart.destroy();
The above content does NOT show the entire file contents. If you need to view any lines of the file which were not shown to complete your task, call this tool again to view those lines.
