" />

好紧好涨好大,国产亚洲精品999,在线激情视品,草av在线观看,制服av五区,香蕉伊人小说网,国产99热久久99,久久涩涩久久,日韩入B视频

首頁資訊商務(wù)會員鋼材特鋼不銹爐料鐵礦煤焦鐵合金有色化工水泥財經(jīng)指數(shù)人才會展鋼廠海外研究統(tǒng)計數(shù)據(jù)手機期貨論壇百科搜索導(dǎo)航短信English
鋼鐵博客  _潛伏_
鋼之家社區(qū)
鋼之家 | 鋼鐵博客 | 鋼鐵論壇 | 鋼鐵百科
您現(xiàn)在的位置: 鋼鐵博客 > _潛伏_
歡迎登陸博客    s_1_586的辯論
主人信息
_潛伏_(公開)
Blog主人:s_1_586
Blog分類:休閑娛樂類
Blog積分:736.0
日志數(shù)量:1
開啟時間:2011-09-27
瀏覽次數(shù):7666
評論數(shù)量:0
最后更新:2011-09-27
最新文章
 ·【原創(chuàng)】Core Plot自定義Axis ...
最新評論
 【原創(chuàng)】Core Plot自定義Axis Label
字體: 發(fā)表日期:2011-09-27 16:50 評論:0 點擊:4106
Core Plot是支持Mac OS X和iOS的開源圖形框架,可生成各類柱狀圖、線型圖、餅圖。默認(rèn)的坐標(biāo)顯示為數(shù)值,但可以使用自定義的NumberFormatter來顯示各種坐標(biāo)標(biāo)簽。 自定義NumberFormatter,初始化時輸入包含自定義標(biāo)簽的數(shù)組(這里是一組日期),重寫stringForObjectValue方法,這樣就可以根據(jù)索引值返回所需的自定義標(biāo)簽了。 #import @interface ChartDateFormatter : NSNumberFormatter { NSArray *dates; } -(id) initWithDates: (NSArray *)inDates; @end @implementation ChartDateFormatter - (id)init { self = [super init]; if (self) { // Initialization code here. } return self; } - (id)initWithDates: (NSArray *)inDates { if(self = [super init]) { dates = inDates; } return self; } - (NSString *)stringForObjectValue: (NSDecimalNumber *)coordinateValue { return [dates objectAtIndex:coordinateValue.intValue]; } @end 調(diào)用時,只要把相應(yīng)坐標(biāo)的labelFormatter設(shè)為自定義的NumberFormatter就可以了,坐標(biāo)的值是自定義標(biāo)簽數(shù)組的索引值。 CPTXYAxisSet *axisSet = (CPTXYAxisSet *)graph.axisSet; CPTXYAxis *x = axisSet.xAxis; CPTXYAxis *y = axisSet.yAxis; //x.labelingPolicy = CPTAxisLabelingPolicyNone; CPTConstraints x2Constraints = {CPTConstraintFixed, CPTConstraintFixed}; x.isFloatingAxis = YES; x.constraints = x2Constraints; x.majorIntervalLength = CPTDecimalFromString(@"10"); x.minorTicksPerInterval = 4;//每兩個大刻度中有多少個小刻度,5等分的話,這個值為4 x.orthogonalCoordinateDecimal = CPTDecimalFromString(@"0"); x.labelRotation = M_PI / 4; x.majorTickLength = 5; x.minorTickLength = 2; ChartDateFormatter *myFormatter = [[[ChartDateFormatter alloc] initWithDates:dates] autorelease]; x.labelFormatter = myFormatter;

※ ※ ※ 本文純屬【s_1_586】個人意見,與【鋼之家鋼鐵博客】立場無關(guān).※ ※ ※

該日志尚無評論!


您希望聯(lián)系哪位客服?(單擊選擇)

伊宁市| 德保县| 九龙县| 郯城县| 岳阳县| 林口县| 灵山县| 蓝山县| 大新县| 鄂州市| 忻州市| 定西市| 黑河市| 芮城县| 淳安县| 连城县| 元谋县| 镇巴县| 小金县| 阳朔县| 廉江市| 兰溪市| 婺源县| 赫章县| 宜宾市| 益阳市| 祁连县| 饶平县| 崇礼县| 麟游县| 崇义县| 永寿县| 拜泉县| 贵德县| 仙居县| 正定县| 贵定县| 新邵县| 黎川县| 读书| 德安县|