私はコアプロットの初心者です。私は離れたデータベースから取得したデータを表示するために、私のアプリでcore-plotを使いたい。配列に使用するデータを置くことはできますが、この配列を使ってグラフィックを変更する方法はわかりません。データをコアプロットに挿入
私はcore-plot googleサイト(http://code.google.com/p/core-plot/)でスタックオーバーフローを監視していますが、何か助けになるものが見つかりませんでした。
これはグラフィックが表示しているもので、配列を使用してgraph-plotにデータを挿入したいと考えています。
EDITED:
-(NSNumber *)numberForPlot:(CPPlot *)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)index
{
NSDecimalNumber *num = nil;
if ([plot isKindOfClass:[CPBarPlot class]]) {
switch (fieldEnum) {
case CPBarPlotFieldBarLocation:
num = (NSDecimalNumber *)[NSDecimalNumber numberWithUnsignedInteger:index];
break;
case CPBarPlotFieldBarLength:
//num = (NSDecimalNumber *)[NSDecimalNumber numberWithUnsignedInteger:(index+10)+15];
//num = [NSNumber numberWithInt:values];
//num = (NSDecimalNumber *)[arrayTemperature objectAtIndex:index];
num =[ NSDecimalNumber numberWithInt:arrayTemperature ];
if ([plot.identifier isEqual:@"Bar Plot 2"])
num = [num decimalNumberBySubtracting:[NSDecimalNumber decimalNumberWithString:@"10"]];
break;
}
}
return num;
}
私も試してみました:
case CPBarPlotFieldBarLength:
//num = (NSDecimalNumber *)[NSDecimalNumber numberWithUnsignedInteger:(index+20)];
//num = [NSNumber numberWithInt:values];
//num = (NSDecimalNumber *)[arrayTemperature objectAtIndex:index]
num=nil;
int i=0;
for (i=0; i=9;i++){
num = [arrayTemperature objectAtIndex:i];
}
誰かがこれに対処するための配列を使用する方法についてのアイデア、または他のアイデアを持っている場合は私に知らせてください。
私はあなたのソリューションを試してみましたが、それは働いていませんなぜ私は3日間この作業に取り組んでいたのかわからないし、解決策が見つからない。 配列をテストして空ではないので、型をテストするとNSNumberになります。 私は何をすべきかわからない – ciwol