+ {/* Toggle Buttons */}
+
+
+
+
+
+
+
+ {/* Content based on active view */}
+ {activeView === 'chart' ? (
+ // Donut Chart View (Slide 1)
+
+ ) : (
+ // Table View (Slide 2)
+
+
+
+
+ Kategori
+
+ Jml
+
+
+ Nilai
+
+
+
+
+ {productData.map((row, index) => (
+
+ {row.kategori}
+ {row.jumlah}
+ {formatCurrency(row.nilai)}
+
+ ))}
+
+
+
+ Total
+
+ {totalJumlah}
+
+
+ {formatCurrency(totalNilai)}
+
+
+
+
+
+ )}
+
+ {/* Two dot indicators at bottom */}
+
+
setActiveView('chart')}
+ >
+
setActiveView('table')}
+ >
+
+
+