ChartsOrg / ChartsOrg/Charts

problem of zoomWithScaleX

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

Description

In ChartsDemo-> LineChart

I add

`[_chartView zoomWithScaleX: 4 scaleY:1 xValue:30 yValue:1 axis:AxisDependencyLeft];`

at the bottom of function

`- (void)setDataCount:(int)count range:(double)range`

I expect the chart will center at (30,1),
but the final chart is
![simulator screen shot 23 apr 2017 8 54 31 pm](https://cloud.githubusercontent.com/assets/1391101/25313739/6e0faa50-2867-11e7-9541-ebde79a63e8c.png)

the center point is not (30,1)

what is the usage of zoomWithScaleX?

In MpAndroidChart,

`zoom(float scaleX, float scaleY, float xValue, float yValue, AxisDependency axis)` will center at (xValue, yValue).

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.