我现在正在使用MIMChartLib来开发Iphone Chart,
但是我在折线图中遇到麻烦,

例如
这是我的CSV

Time;NAME;value001;value002;value003;value004;01:00.0;ABCABC;1837;1837.2;1836.5;183102:00.0;ABCABC;1836.7;1837;1836.5;1836.703:00.0;ABCABC;1827;1827.2;1816.5;1826.904:00.0;ABCABC;1837;1837.2;1836.5;1836.905:00.0;ABCABC;1837;1837.2;1836.5;1836.9

我如何将Y轴设置为18000,但不能从零开始。
否则,图表将显示很小。

这是preview

这是我的代码
    / *
     日期;时间;货币;出价;询问
     14/9/2011; 00:03.0; LLGUSD; 1836.5; 1837

 */


[MIMColor InitColors];
NSString *csvPath1 = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"myTableBar.csv"];
//LineGraph *lineGraph=[[LineGraph alloc]initWithFrame:CGRectMake(100, 20, 220, 380)];
LineGraph *lineGraph=[[LineGraph alloc]initWithFrame:Chartarea.frame];
lineGraph.needStyleSetter=YES;
lineGraph.xIsString=YES;
lineGraph.anchorType=CIRCLEBORDER; //OTHER anchorType
[lineGraph readFromCSV:csvPath1 titleAtColumn:1 valueInColumn:[NSArray arrayWithObjects:@"1",@"3", nil]];
[lineGraph displayYAxis];
[lineGraph displayXAxisWithStyle:5]; //OTHER styles FOR X-Axis Labels
[lineGraph drawWallGraph];

[self.view addSubview:lineGraph];


非常感谢你!!

最佳答案

go this link

https://github.com/ReetuRaj/MIMChart-Library

in YAxisBand.m file u have this method it work for me.....


-(void)setScaleForYTile:(float)value  withNumOfLines:(int)numOfHorLines
{
    pixelPerYTile=18000000.0;
    //pixelPerYTile=value;
    HorLines=numOfHorLines;
    [self setNeedsDisplay];

}

关于iphone - iPhone MIMChartLib图表:如何设置Y轴从18000开始而不是0?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7527140/

10-10 02:41