gpt4 book ai didi

iPhone MIMChartLib 图表绘图 : How can i set the Y-axis starting from 18000 but not 0?

转载 作者:行者123 更新时间:2023-11-29 04:58:17 26 4
gpt4 key购买 nike

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

例如这是我的 CSV

时间;名称;value001;value002;value003;value004;
01:00.0;ABCABC;1837;1837.2;1836.5;1831
02:00.0;ABCABC;1836.7;1837;1836.5;1836.7
03:00.0;ABCABC;1827;1827.2;1816.5;1826.9
04:00.0;ABCABC;1837;1837.2;1836.5;1836.9
05: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 MIMChartLib 图表绘图 : How can i set the Y-axis starting from 18000 but not 0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7527140/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com