2016-09-01 46 views

回答

-1

只能更改此屬性:

NSDictionary *_plotThemeAttributes = @{ 
            kPlotFillColorKey : [UIColor colorWithRed:0.47 green:0.75 blue:0.78 alpha:0.5], 
            kPlotStrokeWidthKey : @2, 
            kPlotStrokeColorKey : [UIColor colorWithRed:0.18 green:0.36 blue:0.41 alpha:1], 
            kPlotPointFillColorKey : [UIColor colorWithRed:0.18 green:0.36 blue:0.41 alpha:1], 
            kPlotPointValueFontKey : [UIFont fontWithName:@"TrebuchetMS" size:18] 
            }; 

這:

NSDictionary *_themeAttributes = @{ 
           kXAxisLabelColorKey : [UIColor colorWithRed:0.48 green:0.48 blue:0.49 alpha:0.4], 
           kXAxisLabelFontKey : [UIFont fontWithName:@"TrebuchetMS" size:10], 
           kYAxisLabelColorKey : [UIColor colorWithRed:0.48 green:0.48 blue:0.49 alpha:0.4], 
           kYAxisLabelFontKey : [UIFont fontWithName:@"TrebuchetMS" size:10], 
           kYAxisLabelSideMarginsKey : @20, 
           kPlotBackgroundLineColorKey : [UIColor colorWithRed:0.48 green:0.48 blue:0.49 alpha:0.4], 
           kDotSizeKey : @10 
           }; 
+1

是的,但我想改變的只有一個情節顏色。 它從上面的代碼中改變了所有的繪圖顏色。 –

+0

這個庫不支持這樣的操作,試試這個https://github.com/danielgindi/Charts –

+0

這個庫在swift中。我想要的目標c –