Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to drag the LineChartView #3211

Closed
lee727n opened this issue Jan 26, 2018 · 9 comments
Closed

how to drag the LineChartView #3211

lee727n opened this issue Jan 26, 2018 · 9 comments

Comments

@lee727n
Copy link

lee727n commented Jan 26, 2018

i have a question,i add the linechartView in uiview. the uiview add in a controller's view such
self.view addSubview:_firstIV self.chartView = [LineChartView new];
[_firstIV addSubview:_chartView]; i want to use the functions such as , i have total 12 months,but in the linchartview just display 6 month ,and another 6 months need i drag the linchartview to see it , to dispaly another 6 months . seems like move in scrollview. how can i achieve this behavior . wheather the chats libary support this functions.

@ha1o0
Copy link

ha1o0 commented Jan 31, 2018

I also need this feature, how to achieve it?

@ha1o0
Copy link

ha1o0 commented Jan 31, 2018

Hi, I have found the solution. There is a function called "setVisibleXRangeMaximum". It means that you can set the 6 months data that will display in the chartView, and you can scroll the chart to see other 6 months data.
Hope it can help you!

@dandanbrother
Copy link

@weifengsmile I have set the property, but it still doesn't work for me... I have set the maxVisibleCount and setVisibleXRangeMaximum. Plus, the dataArray's count is greater than the both. So I have no idea how to scroll the Chart without a ScrollView

@dandanbrother
Copy link

Oh, I just set the property after the chart's data has been set then it can be scrolled.

@liuxuan30
Copy link
Member

use setVisibleXRange or similar proerties like moveViewToX

@littleObsession
Copy link

@liuxuan30 when i use HorizontalBarChartView, i also need display partial data, scroll to display other data. But i set setVisibleXRangeMaximum or setVisibleXRangeWithMinXRange:<#(double)#> maxXRange:<#(double)#> still doesn't work. can you help me how to solve it? thank.

@realchen
Copy link

我这边需求 一共可能30条数据,然后默认只显示五条,其余的通过左滑
已经进行了如下设置
[_lineView setVisibleXRangeMaximum:10];// 最大显示
[_lineView setVisibleXRangeMinimum:4];// 最小显示
[_lineView moveViewToX:19];// 移动到那个点 x轴坐标
现在不能进行拖拽,不知道如何解决
lineChartView.dragEnabled = YES;//启用拖拽图标
这个也已经设了,请问下如何解决呢?

@WangSunshine
Copy link

我这边需求 一共可能30条数据,然后默认只显示五条,其余的通过左滑
已经进行了如下设置
[_lineView setVisibleXRangeMaximum:10];// 最大显示
[_lineView setVisibleXRangeMinimum:4];// 最小显示
[_lineView moveViewToX:19];// 移动到那个点 x轴坐标
现在不能进行拖拽,不知道如何解决
lineChartView.dragEnabled = YES;//启用拖拽图标
这个也已经设了,请问下如何解决呢?

请问你解决了吗 我也是

@zdmjerry
Copy link

zdmjerry commented Dec 8, 2019

你好,你解决了吗。我也有这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants