0
我在我的應用程序中使用SHLineGraphView。 我想改變不同顏色的第一個陰謀的顏色。SHLineGraphView - 只更改第一個陰謀的顏色
我試過kPlotPointFillColorKey
但這是改變所有情節的顏色。我只想改變第一個情節。
是否有可能?
我在我的應用程序中使用SHLineGraphView。 我想改變不同顏色的第一個陰謀的顏色。SHLineGraphView - 只更改第一個陰謀的顏色
我試過kPlotPointFillColorKey
但這是改變所有情節的顏色。我只想改變第一個情節。
是否有可能?
只能更改此屬性:
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
};
是的,但我想改變的只有一個情節顏色。 它從上面的代碼中改變了所有的繪圖顏色。 –
這個庫不支持這樣的操作,試試這個https://github.com/danielgindi/Charts –
這個庫在swift中。我想要的目標c –