Created At: 2026-06-14T16:12:08Z
Completed At: 2026-06-14T16:12:08Z
File Path: `file:///c:/Users/HP/Downloads/climate-system/climate-system/index.php`
Total Lines: 3878
Total Bytes: 161401
Showing lines 2420 to 2550
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.
2420: 
2421:     // Global chart instance to avoid "Canvas is already in use" error in Chart.js
2422:     let futureClimateChart = null;
2423:     let futureCSVChart = null;
2424: 
2425:     // Fungsi menggambar grafik Time Series interaktif dari data CSV dengan Uncertainty Shading ala IPCC
2426:     function renderFutureCSVChart(payload, variableName, statistic, startYear, endYear) {
2427:       const canvas = document.getElementById('futureChartCanvas');
2428:       if (!canvas) return;
2429: 
2430:       const container = document.getElementById('futureInteractiveChartContainer');
2431:       if (container) container.style.display = 'block';
2432: 
2433:       // Sembunyikan legenda manual overlay bawaan simulasi DB
2434:       const legendOverlay = document.getElementById('futureChartLegendOverlay');
2435:       if (legendOverlay) legendOverlay.style.display = 'none';
2436: 
2437:       // Bersihkan instance Chart.js sebelumnya agar tidak tumpang tindih
2438:       if (futureCSVChart) {
2439:         futureCSVChart.destroy();
2440:       }
2441:       if (futureClimateChart) {
2442:         futureClimateChart.destroy();
2443:       }
2444: 
2445:       // Update Judul Grafik & Informasi Metadata
2446:       const titleEl = document.getElementById('futureChartTitle');
2447:       if (titleEl) {
2448:         titleEl.innerText = `Projected ${variableName} (${statistic}) until 2100`;
2449:       }
2450:       
2451:       const vTextTS = document.getElementById('futureVariableTextTS');
2452:       if (vTextTS) vTextTS.innerText = `Variabel: ${variableName} (${sta
<truncated 2585 bytes>
 Uncertainty ---
2507:             {
2508:               label: 'SSP1-2.6 (Batas Bawah)',
2509:               data: min.map(d => ({ x: d.year, y: d.ssp126 })),
2510:               borderColor: 'transparent',
2511:               pointRadius: 0,
2512:               fill: false,
2513:               showLine: true
2514:             },
2515:             {
2516:               label: 'SSP1-2.6 (Batas Atas)',
2517:               data: max.map(d => ({ x: d.year, y: d.ssp126 })),
2518:               borderColor: 'transparent',
2519:               pointRadius: 0,
2520:               backgroundColor: 'rgba(29, 78, 216, 0.12)', // Semi-transparan biru
2521:               fill: '-1', 
2522:               showLine: true
2523:             },
2524:             {
2525:               label: 'SSP1-2.6 (Rendah)',
2526:               data: mean.map(d => ({ x: d.year, y: d.ssp126 })),
2527:               borderColor: '#1D4ED8', // Royal Blue
2528:               borderWidth: 2.8,
2529:               pointRadius: 0,
2530:               pointHoverRadius: 6,
2531:               fill: false
2532:             },
2533: 
2534:             // --- SSP2-4.5 Area Uncertainty ---
2535:             {
2536:               label: 'SSP2-4.5 (Batas Bawah)',
2537:               data: min.map(d => ({ x: d.year, y: d.ssp245 })),
2538:               borderColor: 'transparent',
2539:               pointRadius: 0,
2540:               fill: false,
2541:               showLine: true
2542:             },
2543:             {
2544:               label: 'SSP2-4.5 (Batas Atas)',
2545:               data: max.map(d => ({ x: d.year, y: d.ssp245 })),
2546:               borderColor: 'transparent',
2547:               pointRadius: 0,
2548:               backgroundColor: 'rgba(234, 88, 12, 0.12)', // Semi-transparan orange
2549:               fill: '-1',
2550:               showLine: true
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.
