- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.9k
Open
Description
Description
It would be very useful to extend the current PieChart with support for stacked slices.
Instead of each slice containing a single value, a slice could contain a list of values (segments). These segments would be rendered as concentric radial bands inside the slice, similar to a stacked bar chart but in polar coordinates.
Example
 
Proposed Solution
class StackedPieChartData extends BaseChartData {
  final List<StackedPieSectionData> sections;
  // ... other than that just the same props like in [PieChartData]
}
class StackedPieSectionData {
  final double weight;
  final double radius;
  final List<StackedPieSegmentData> segments;
  // ... other than that just the same props like in [PieChartSectionData]
}
class StackedPieSegmentData {
  final double value;
  final Color color;
  final Gradient? gradient;
}Alternatives
I have considered Alternatives within and outside of fl_chart:
- fl_chart: Put two or more [PieChart] inside a [Stack] -> Problem: Need to sync touch interactions and animations, which is tedious
- Other packages: I tried using graphic, but the API is not convenient and features such as animations when selecting a slice was not possible
jay-k98, joma1021, benedom, jfafioluexx and hanneluca
Metadata
Metadata
Assignees
Labels
No labels