Core Plot跳过的值Graph

编程入门 行业动态 更新时间:2024-10-28 14:29:54
本文介绍了Core Plot跳过的值Graph的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试使用每天/每周(由时间范围决定)作为x轴标签的用户友好时间轴绘制图表。但是,数据源值是在另一个基础上给出的 - 一天可能有10个条目,而第一个可能在一个月内。

i'm trying to draw a Graph with a user-friendly timeline having every day/week (to be decided by time range) as a label at x-axis. However, the datasource values are given on another basis - there might be 10 entries one day and the eleventh comes in a month.

查看photoshop图片:

See the photoshop image:

使用最新的Core Plot drop我无法找到方法,需要你的帮助。

With the latest Core Plot drop I cannot find a way to do it, need your help.

问候, user792677。

Regards, user792677.

推荐答案

散点图询问xy数据对的数据源。不要求任何值遵循某种顺序或常规模式。其他绘图类型的工作方式类似,但数据字段的名称和数量可能会有所不同。

The scatter plot asks the datasource for x-y pairs of data. There is no requirement that either value follow some sort of sequence or regular pattern. Other plot types work similarly, although the names and number of data fields can vary.

在您的示例中,从 -numberOfRecordsForPlot返回4:方法。从 -numberForPlot:field:recordIndex:方法返回以下值。该表假设您的y值是由函数f(x)计算的,但它们当然可以来自任何来源。使用字段参数来确定图是否要求x值或y值。

In your example, return 4 from the -numberOfRecordsForPlot: method. Return the following values from the -numberForPlot:field:recordIndex: method. The table assumes your y-values are calculated by a function f(x), but they can of course come from any source. Use the field parameter to determine whether the plot is asking for the x- or y- value.

Index X-Value Y-Value 0 1 f(1) 1 3 f(3) 2 9 f(9) 3 10 f(10)

更多推荐

Core Plot跳过的值Graph

本文发布于:2023-11-16 21:19:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1607502.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:跳过   Core   Plot   Graph

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!