We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9ef15d commit 0b8c729Copy full SHA for 0b8c729
lib/src/interactive_chart.dart
@@ -199,8 +199,8 @@ class _InteractiveChartState extends State<InteractiveChart> {
199
startOffset += dx;
200
// Adjust pan when zooming
201
final double prevCount = w / _prevCandleWidth;
202
- final double currCount = w / _candleWidth;
203
- final zoomAdjustment = (currCount - prevCount) * _candleWidth;
+ final double currCount = w / candleWidth;
+ final zoomAdjustment = (currCount - prevCount) * candleWidth;
204
final focalPointFactor = details.localFocalPoint.dx / w;
205
startOffset -= zoomAdjustment * focalPointFactor;
206
startOffset = startOffset.clamp(0, _getMaxStartOffset(w, candleWidth));
0 commit comments