Skip to content

Commit 53c6ec7

Browse files
jbbjarnasonrudi-q
authored andcommitted
release 1.10.3 fix: initialize scale padding before painting (#54)
deduce scale unit space before painting the chart. before panning would call setupYScale and would change the padding, which caused the chart to reduce in size
1 parent 9e080f1 commit 53c6ec7

6 files changed

Lines changed: 58 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,32 @@
1+
## 1.10.3 - 2025-10-23
2+
3+
#### 🐛 Scale Padding Fix
4+
5+
**Authored by [@jbbjarnason](https://github.com/jbbjarnason)** - Thank you for this fix!
6+
7+
**Fixed Chart Shrinking During Pan Operations:**
8+
- Scale padding now initialized before painting charts
9+
- Prevents `setupYScale` from changing padding during panning
10+
- Chart maintains consistent size during all pan operations
11+
- Smooth user experience without unintended resize behavior
12+
13+
**Technical Details:**
14+
- Added `_setupScales()` method to initialize X and Y scales before chart painting
15+
- Fixes bug where panning would call `setupYScale` and reduce chart dimensions
16+
- Applied to both animated chart render paths
17+
18+
#### 🧪 Quality Assurance
19+
20+
- All existing tests continue to pass
21+
- Zero breaking changes - fully backward compatible
22+
23+
---
24+
125
## 1.10.2 - 2025-10-21
226

327
#### 🎨 Heat Map Unification & Bounds Fixes
428

5-
**Authored by [@davidlrichmond](https://github.com/davidlrichmond)**
29+
**Authored by [@davidlrichmond](https://github.com/davidlrichmond)** - Thank you for this contribution!
630

731
**Heat Map Color System Unification:**
832
- Unified heat maps to use `GradientColorScale` for consistent color handling

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ chart
11011101

11021102
## 🧪 Development Status
11031103

1104-
**Current Version: 1.10.2** - Production ready with axis titles, bubble size guides, interactive floating legends, and intelligent axis bounds
1104+
**Current Version: 1.10.3** - Production ready with axis titles, bubble size guides, interactive floating legends, and intelligent axis bounds
11051105

11061106
We're shipping progressively! Each release adds new visualization types while maintaining backward compatibility.
11071107

doc/installation.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ If you prefer to add the dependency manually, update your `pubspec.yaml`:
2626
dependencies:
2727
flutter:
2828
sdk: flutter
29-
cristalyse: ^1.10.2 # Latest version
29+
cristalyse: ^1.10.3 # Latest version
3030
```
3131
3232
Then run:
@@ -105,6 +105,7 @@ Cristalyse has minimal dependencies to keep your app lightweight:
105105

106106
| Version | Release Date | Key Features |
107107
|---------|-------------|--------------|
108+
| 1.10.3 | October 2025 | Scale padding fix for consistent chart sizing during pan operations |
108109
| 1.10.2 | October 2025 | Heat map color unification and bounds edge case validation |
109110
| 1.10.1 | October 2025 | Wilkinson labeling precision fix for large numbers |
110111
| 1.10.0 | October 2025 | Axis titles and bubble size guide with edge case validation |

doc/updates.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,26 @@ seo:
1212

1313
Stay informed about the latest features, improvements, and fixes in Cristalyse.
1414

15+
<Update label="October 23, 2025" description="v1.10.3">
16+
### 🐛 Scale Padding Fix
17+
18+
**Authored by [@jbbjarnason](https://github.com/jbbjarnason)** - Thank you for this fix!
19+
20+
**Fixed chart shrinking when panning**
21+
- Scale padding now initialized before painting charts
22+
- Prevents setupYScale from changing padding during panning
23+
- Chart maintains consistent size during all pan operations
24+
- Smooth user experience without unintended resize behavior
25+
26+
**Quality Assurance:**
27+
- All existing tests continue to pass
28+
- Zero breaking changes - fully backward compatible
29+
</Update>
30+
1531
<Update label="October 21, 2025" description="v1.10.2">
1632
### 🎨 Heat Map Unification & Bounds Validation
1733

18-
**Authored by [@davidlrichmond](https://github.com/davidlrichmond)**
34+
**Authored by [@davidlrichmond](https://github.com/davidlrichmond)** - Thank you for this contribution!
1935

2036
**Heat Map Color System Unification:**
2137
- Unified heat maps to use `GradientColorScale` for consistent color handling

lib/src/widgets/animated_chart_widget.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,8 @@ class _AnimatedCristalyseChartWidgetState
466466
size.height - widget.theme.padding.vertical,
467467
);
468468

469+
_setupScales(plotArea.width, plotArea.height);
470+
469471
final chartPainter = chartPainterAnimated(
470472
widget: widget,
471473
context: context,
@@ -744,6 +746,8 @@ class _AnimatedCristalyseChartWidgetState
744746
size.height - tempWidget.theme.padding.vertical,
745747
);
746748

749+
_setupScales(plotArea.width, plotArea.height);
750+
747751
final chartPainter = chartPainterAnimated(
748752
widget: tempWidget,
749753
context: context,
@@ -973,6 +977,14 @@ class _AnimatedCristalyseChartWidgetState
973977
}
974978
}
975979

980+
void _setupScales(double width, double height) {
981+
_setupXScale(width, widget.geometries.any((g) => g is BarGeometry));
982+
_setupYScale(
983+
height, widget.geometries.any((g) => g is BarGeometry), YAxis.primary);
984+
_setupYScale(height, widget.geometries.any((g) => g is BarGeometry),
985+
YAxis.secondary);
986+
}
987+
976988
Scale _setupXScale(double width, bool hasBarGeometry) {
977989
if (widget.coordFlipped) {
978990
final preconfigured = widget.yScale;

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: cristalyse
22
description: "Cristalyse is a high-performance data visualization library for Dart/Flutter that implements grammar of graphics principles with native rendering capabilities."
3-
version: 1.10.2
3+
version: 1.10.3
44
homepage: https://cristalyse.com
55
documentation: https://docs.cristalyse.com
66
repository: https://github.com/rudi-q/cristalyse

0 commit comments

Comments
 (0)