2013-07-31 118 views
0

你能爲此建議我嗎?我的代碼在這裏........如何在mimchart庫iPhone中隨着線圖繪製條形圖?

mWallGraph=[[MIMWallGraph alloc]initWithFrame:CGRectMake(50, 200, self.view.frame.size.width-90, self.view.frame.size.width * 0.6)]; 
mWallGraph.delegate=self; 
mWallGraph.anchorTypeArray=[NSArray arrayWithObjects:[NSNumber numberWithInt:NONE], 
          [NSNumber numberWithInt:NONE], 
          [NSNumber numberWithInt:NONE], 
          nil]; 

mWallGraph.xTitleStyle=X_TITLES_STYLE3; 
[mWallGraph drawMIMWallGraph]; 
[self.view addSubview:mWallGraph]; 

所有委託方法都是爲值定義的。

回答

0

你可以試試這個

myBarChart=[[MIMBarGraph alloc]initWithFrame:CGRectMake(50, 20, self.view.frame.size.width-50, self.view.frame.size.width * 0.3)]; 
      myBarChart.delegate=self; 
      myBarChart.xTitleStyle=XTitleStyle3; 
      //myBarChart.margin=MIMMarginMake(30, 40, 0, 50); 
      myBarChart.gradientStyle=VERTICAL_GRADIENT_STYLE; 

      [myBarChart drawBarChart]; 
      [self.view addSubview:myBarChart]; 

,或者你可以去core-plot library用於圖形顯示在你的應用,而米姆

+0

這個代碼不工作Viruss MCA。我有一個要求,就像我必須根據左側的y軸繪製一個條形圖,並根據右側的y軸繪製另一個線形圖。在單一視圖中,我必須繪製兩個..你能幫助嗎?我? –