ChartsOrg / ChartsOrg/Charts

ChartViewDelegate returns 1 for scale

Open
#2,033 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

I implemented the `chartScaled(_ chartView: ChartViewBase, scaleX: CGFloat, scaleY: CGFloat)` delegate function and printed out the scales.

I deactivated Y scaling. Here are some outputs for zooming in:

`X: 0.931536882679692
X: 0.921152964591802
X: 0.894105479811645
X: 0.908065222887242
X: 0.929244839292549
X: 0.947673229224924
X: 0.958397510003029
X: 0.979796538488494
X: 0.987268809472328
X: 0.987106264645887
X: 0.991902980935948
X: 0.994996062039105
X: 0.98359023958723
X: 0.988468473919186
X: 0.921086207380172
X: 1.0
X: 1.0
X: 1.0
X: 1.0
`

As soon as I let go of the pinch-to-zoom It returns 1 a couple of times. Also those values are kind of all over the place while I was just spreading my indexfinger and thumb constantly.
The visuals are working properly though.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.