Created At: 2026-06-14T16:12:35Z
Completed At: 2026-06-14T16:12:35Z
File Path: `file:///c:/Users/HP/Downloads/climate-system/climate-system/index.php`
Total Lines: 3878
Total Bytes: 161401
Showing lines 2733 to 2900
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.
2733:     function renderFutureClimateChart(variableName, customParams, periodRange, canvasId = 'futureChartCanvas') {
2734:       // Aktifkan kembali legenda overlay bawaan DB
2735:       const legendOverlay = document.getElementById('futureChartLegendOverlay');
2736:       if (legendOverlay && canvasId === 'futureChartCanvas') legendOverlay.style.display = 'flex';
2737: 
2738:       // Hancurkan grafik CSV jika ada agar canvas bersih
2739:       if (canvasId === 'futureChartCanvas' && futureCSVChart) {
2740:         futureCSVChart.destroy();
2741:         futureCSVChart = null;
2742:       }
2743: 
2744:       const canvas = document.getElementById(canvasId);
2745:       if (!canvas) return;
2746: 
2747:       const isMain = (canvasId === 'futureChartCanvas');
2748: 
2749:       if (isMain) {
2750:         const container = document.getElementById('futureInteractiveChartContainer');
2751: 
2752:         if (container) container.style.display = 'block';
2753: 
2754:         if (futureClimateChart) {
2755:           futureClimateChart.destroy();
2756:         }
2757:       } else {
2758:         if (settingsFutureClimateChart) {
2759:           settingsFutureClimateChart.destroy();
2760:         }
2761:       }
2762: 
2763:       // Dynamically update the title text above the canvas container
2764:       const titleEl = document.getElementById(isMain ? 'futureChartTitle' : 'settingsFutureChartTitle');
2765:       if (titleEl) {
2766:         let vDisplay = variableName;
2767:         if (vDisplay.toLowerCase().includes('precipitation') || vDisplay.toLowerCase().in
<truncated 4210 bytes>
005;
2856:         noiseLevel = 0.08;
2857:         unit = 'm/s';
2858:         yLabel = 'Kecepatan Angin (m/s)';
2859:         ssp1_slope = -0.0001;
2860:         ssp2_slope = 0.0002;
2861:         ssp3_slope = 0.0005;
2862:         ssp5_slope = 0.0010;
2863:         baseUncertainty = 0.12;
2864:       } else if (vNorm.includes('radiasi') || vNorm.includes('matahari') || vNorm.includes('solar')) {
2865:         baseVal = 178.0;
2866:         trendHist = -0.03; 
2867:         noiseLevel = 2.5;
2868:         unit = 'W/m²';
2869:         yLabel = 'Radiasi Matahari (W/m²)';
2870:         ssp1_slope = 0.02;  
2871:         ssp2_slope = 0.01;
2872:         ssp3_slope = -0.05; 
2873:         ssp5_slope = 0.04;
2874:         baseUncertainty = 3.5;
2875:       } else if (vNorm.includes('permukaan laut') && (vNorm.includes('suhu') || vNorm.includes('sst'))) {
2876:         baseVal = 28.2;
2877:         trendHist = 0.013;
2878:         noiseLevel = 0.12;
2879:         unit = '°C';
2880:         yLabel = 'Suhu Permukaan Laut (°C)';
2881:         ssp1_slope = 0.004;
2882:         ssp2_slope = 0.012;
2883:         ssp3_slope = 0.030;
2884:         ssp5_slope = 0.045;
2885:         baseUncertainty = 0.2;
2886:       } else if (vNorm.includes('anomali') || vNorm.includes('muka laut') || vNorm.includes('sea level')) {
2887:         baseVal = 0.0;
2888:         trendHist = 0.3; 
2889:         noiseLevel = 0.8;
2890:         unit = 'cm';
2891:         yLabel = 'Anomali Tinggi Muka Laut (cm)';
2892:         ssp1_slope = 0.42;  
2893:         ssp2_slope = 0.65;  
2894:         ssp3_slope = 0.85;  
2895:         ssp5_slope = 1.10;  
2896:         baseUncertainty = 2.5;
2897:       } else if (vNorm.includes('salinitas') || vNorm.includes('salinity')) {
2898:         baseVal = 32.8;
2899:         trendHist = -0.001;
2900:         noiseLevel = 0.08;
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.
