开发者

core-plot map data to x-axis

I am not quite sure if core-plot is able to do this. I have a list of unix timestamps and some values and I need to display it as follows (Line graph)

  • Each year has its own line
  • X-Axis should show the month from Jan - Dec

En entry with the date 19.开发者_C百科02.2011 should be between Feb and March in the x-axis.

Could someone give me a hint on how to do that?

UPDATE

I have an example from Excel how it should look like

core-plot map data to x-axis

Thanks a lot Chris


Core Plot includes several example apps that show how to plot dates along an axis. You can use a CPTTimeFormatter (a wrapper for an NSDateFormatter) to format the values. You have to pick a reference date and then compute the offset between each date value and the reference date. The plot datasource then provides these offsets as the plot data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜