Skip to content

Commit 8f9871e

Browse files
committed
Added cubic smoothing example to README.md
1 parent 99959ea commit 8f9871e

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,20 @@ new Sparkline(
171171

172172
---
173173

174+
### Smoothing
175+
176+
```dart
177+
new Sparkline(
178+
data: data,
179+
useCubicSmoothing: true,
180+
cubicSmoothingFactor: 0.2,
181+
),
182+
```
183+
184+
![cubic smoothing example screenshot](screenshots/example_cubic_smoothing.png)
185+
186+
---
187+
174188
### Todo:
175189

176190
- [x] simple sparkline
@@ -186,7 +200,7 @@ new Sparkline(
186200
- [ ] baseline
187201
- [x] different fill modes [above/below/none]
188202
- [x] fix edge points overflowing by offsetting by lineWidth
189-
- [ ] better corner rounding
203+
- [x] better corner rounding
190204
- [ ] axis labels
191205
- [x] gradient shader on line paint
192206
- [x] gradient shader on fill paint

example/example.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ void main() {
2525
child: new Sparkline(
2626
data: data,
2727
useCubicSmoothing: true,
28+
cubicSmoothingFactor: 0.2,
2829
),
2930
),
3031
),
24.2 KB
Loading

0 commit comments

Comments
 (0)