I want to create graph that uses data retrieved from Core Data. I have been trying to look for a simple tutorial that I can follow to get an understanding on how to do this, but I have had no luck.
我想创建使用从Core Data检索的数据的图表。我一直在努力寻找一个简单的教程,我可以按照这个教程来理解如何做到这一点,但我没有运气。
Does anyone know any tutorials or can guide me on how can I start building my graph from Core Data?
有没有人知道任何教程或可以指导我如何从Core Data开始构建我的图表?
1 个解决方案
#1
Just read the data you need from Core Data, put them in the right format for Core Plot, and tell Core Plot to, well, plot.
只需从Core Data中读取您需要的数据,将它们放入Core Plot的正确格式,并告诉Core Plot,好吧,绘图。
For example, if you need to feed an array of numbers to numbersForPlot
, extract the series from your managed objects and pass that array to this method.
例如,如果需要将数字数组提供给numbersForPlot,请从托管对象中提取系列并将该数组传递给此方法。
#1
Just read the data you need from Core Data, put them in the right format for Core Plot, and tell Core Plot to, well, plot.
只需从Core Data中读取您需要的数据,将它们放入Core Plot的正确格式,并告诉Core Plot,好吧,绘图。
For example, if you need to feed an array of numbers to numbersForPlot
, extract the series from your managed objects and pass that array to this method.
例如,如果需要将数字数组提供给numbersForPlot,请从托管对象中提取系列并将该数组传递给此方法。