Learn about the pie and bar chart types available in Simple Charts
Simple Charts supports two chart types optimized for classroom data visualization: Pie Charts and Bar Charts. Each type is designed to clearly present survey results, poll data, and other educational datasets.
The chart type is stored in the application state and can be toggled between "pie" and "bar":
// From App.jsx:139chartType: safeOptions.chartType === "bar" ? "bar" : "pie",
When switching from pie to bar charts, note that bar charts support negative values while pie charts do not. The validation system will automatically check your data against the requirements for the selected chart type.
Each chart type has specific validation rules enforced at App.jsx:230-244:
if (chartType === "pie") { if (validRows.some((row) => row.value < 0)) { blockingIssues.push("Pie charts do not support negative values."); } if (validRows.length > 0 && !validRows.some((row) => row.value > 0)) { blockingIssues.push("Pie charts need at least one value above zero."); } if (valueMode === "percentage") { const total = validRows.reduce((sum, row) => sum + row.value, 0); if (validRows.length > 0 && Math.abs(total - 100) > 0.5) { exportIssues.push("For pie charts, percentage totals should be close to 100."); } }}