iPhone 绘图/图表库

发布于 2024-08-30 16:22:00 字数 113 浏览 5 评论 0原文

我正在寻找好的绘图库(折线图、饼图、柱形图),它允许与用户触摸进行交互,例如股票应用程序中的内容。

我找到了一个核心图库,但似乎交互逻辑没有得到很好的覆盖。

请建议可以使用哪些库?

I am looking for good plotting library (line, pie, column charts) which allows to interact with user touches something like in Stocks app.

I found a core-plot library but seems like that interaction logic is not well-covered.

Please suggest what libraries can be used?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墨小沫ゞ 2024-09-06 16:22:00

配置出来的问题。

交互逻辑包含在 CPLayerHostingView.m 文件的 core-plot 库中。

如果您需要将 ViewControllerCPLayerHostingView 关联,只需添加属性:

@interface CPLayerHostingView : UIView<CPPlotDataSource> {
@protected
    CPLayer *hostedLayer;
    CPTestAppScatterPlotController *touchController;
}

@property (nonatomic, readwrite, retain) CPLayer *hostedLayer;
@property (nonatomic, readwrite, retain) CPTestAppScatterPlotController *touchController;

然后在 ViewController 使用代码:

CPLayerHostingView *hostingView = (CPLayerHostingView *)self.view;
hostingView.touchController = self;

现在您可以运行任何控制器的从视图中查看方法。

Configured out the issue.

Interaction logic is covered in core-plot library in CPLayerHostingView.m file.

If you need to associate your ViewController with CPLayerHostingView, simply add property:

@interface CPLayerHostingView : UIView<CPPlotDataSource> {
@protected
    CPLayer *hostedLayer;
    CPTestAppScatterPlotController *touchController;
}

@property (nonatomic, readwrite, retain) CPLayer *hostedLayer;
@property (nonatomic, readwrite, retain) CPTestAppScatterPlotController *touchController;

Then in ViewController use code:

CPLayerHostingView *hostingView = (CPLayerHostingView *)self.view;
hostingView.touchController = self;

So now you are able to run any controller's view methods from view.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文