core plot custom Theme?

前端 未结 4 403
失恋的感觉
失恋的感觉 2021-02-04 12:40

I\'m using Core-Plot for a trend chart in an iPhone app and haven\'t found how to customize the background. I can create a theme using the built-in themes, like kCPPlainWhiteThe

4条回答
  •  不思量自难忘°
    2021-02-04 13:13

    In addition to what Eric suggests, you can also try setting the fill to a clear color. For example, I've used this in the past to provide a transparent background to graphs:

    CPTTheme *theme = [CPTTheme themeNamed:kCPPlainWhiteTheme];
    graph = (CPTXYGraph *)[theme newGraph];
    
    graph.fill = [CPTFill fillWithColor:[CPTColor clearColor]];
    graph.plotAreaFrame.fill = [CPTFill fillWithColor:[CPTColor clearColor]];
    

提交回复
热议问题