Repository navigation
v1.1.0: Circular Chart with Threshold Support
馃帀 New Features
SleepCircularChartView
- New circular chart component with percentage-based sleep duration visualization
- Configurable threshold system - set custom sleep duration targets (default: 9 hours)
- Optional sun/moon icons - toggle sleep start/end indicators on/off
- Percentage-based arc filling - starts at 12 o'clock and fills clockwise based on sleep duration vs threshold
馃敡 API Changes
New Parameters
thresholdHours: Double- Sleep duration threshold for percentage calculation (default: 9.0)showIcons: Bool- Display sun/moon icons at start/end of sleep arc (default: true)
Usage Examples
```swift
// Basic circular chart (9-hour threshold by default)
SleepCircularChartView(samples: sleepSamples)
// Custom threshold and styling
SleepCircularChartView(
samples: sleepSamples,
lineWidth: 20,
size: 200,
showIcons: false,
thresholdHours: 8.0
)
```
馃摎 Documentation
- Updated README with comprehensive circular chart documentation
- Added parameter descriptions and usage examples
- Updated architecture section with new components
馃И Testing
- Added comprehensive test suite for circular chart functionality
- All existing tests continue to pass
- Verified Swift package compilation
馃挕 How it Works
If a user sleeps 7 hours with a 9-hour threshold, the circle fills 77.8% (7/9) of the way around, providing intuitive visual feedback on sleep goal progress.
Full Changelog: v1.0.0...v1.1.0