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

你好,我发现图表的底部是可以点击的,点击后变成灰色,那条曲线就隐藏了,再点击一下曲线又出现了 #30

Closed
yuzhiyun opened this issue Jul 2, 2017 · 10 comments

Comments

@yuzhiyun
Copy link

yuzhiyun commented Jul 2, 2017

如题,当我隐藏掉一条曲线之后,由于我的图表是实时变化的,需要不断执行

[self.chartView aa_refreshChartWithChartModel:_chartModel];

来更新数据,但是我一执行aa_refreshChartWithChartModel函数,

之前我想要隐藏的曲线又出来了,能不能保持它仍旧被隐藏??

@yuzhiyun
Copy link
Author

yuzhiyun commented Jul 2, 2017

希望求解,谢谢楼主大神

@yuzhiyun
Copy link
Author

yuzhiyun commented Jul 2, 2017

可以留一个邮箱吗?这里沟通效率好低哦,非常感谢

@AAChartModel
Copy link
Owner

AAChartModel commented Jul 4, 2017

首先在这里预先解释一下 AAChartView 类当中的两个方法之间的区别:

- (void)aa_drawChartWithChartModel:(AAChartModel *)chartModel;

此方法是首次绘制图表(首次绘制图表是需要第一次加载 HTML 文件内容),为了避免每次绘制图形都需要重新加载图表,所以 AAChartView 提供了

- (void)aa_refreshChartWithChartModel:(AAChartModel *)chartModel;

此方法只调用绘制方法,不再重新加载 HTML 文件内容,从而提高了图形的绘制效率.
这两个方法都是重新绘制图表的全部内容,不适用于只局部刷新图表数据的情况.

@AAChartModel
Copy link
Owner

AAChartModel commented Jul 4, 2017

从你的描述来看,我的理解是你希望在实时刷新图表时,只是刷新图表的数据内容,其他部分的内容没有变化.鉴于这一点,我为AAChartView 提供了一个新的方法

- (void)aa_onlyRefreshTheChartDataWithChartModel:(AAChartModel *)chartModel;

此方法在刷新图表时,只是单纯的刷新图表模型 AAChartModel 的属性 series 数据内容,不刷新其余内容,应该契合了你的需求.

@AAChartModel
Copy link
Owner

AAChartModel commented Jul 4, 2017

AAChartKitdemo 中,现已添加模拟实时刷新数据示例,你可以更新 demo 并运行查看示例效果.

@yuzhiyun
Copy link
Author

yuzhiyun commented Jul 4, 2017

您好,我使用了你的新接口,aa_onlyRefreshTheChartDataWithChartModel ,但是貌似只支持显示一条曲线的情况,我的series数组是多条曲线的数据,最终仅仅显示了一条曲线,请您帮忙再看看代码是不是哪里出现小问题呢

AAChartModel added a commit that referenced this issue Jul 4, 2017
@AAChartModel
Copy link
Owner

AAChartModel commented Jul 4, 2017

感谢提出的问题,现在issue已解决,并在模拟动态更新数据示例中添加了新的内容,你可以更新并查看效果了.后续有什么使用上的问题,欢迎提问😊

@yuzhiyun
Copy link
Author

yuzhiyun commented Jul 5, 2017

太棒啦,终于满足我的需求了,感谢楼主

@AAChartModel
Copy link
Owner

AAChartModel commented Jul 5, 2017

满足需求就好,我也感到安慰!这个库其实也没有太多的东西,如果你后面有什么好的想法,也可以自己拉取一个分支,改动后,向我提一个 pull request, 我再merge一下☺

@yuzhiyun
Copy link
Author

yuzhiyun commented Jul 13, 2017

哈哈,我是Android工程师,因为一些原因才学习了iOS,有机会一定可以的

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

2 participants