1
votes

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.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

enter image description here

Thanks a lot Chris

1

1 Answers

2
votes

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.