Charts: '_xBounds' and other variables inaccessible due to 'internal' protection level workaround

Created on 9 Feb 2018  Â·  1Comment  Â·  Source: danielgindi/Charts

I have a Cocoapods install of this library on Swift 4 and am trying to set up a custom LineChartRenderer by extending and creating my own CustomLineChartRenderer: LineChartRenderer. But to use the LineChartRenderer, the scope of certain variables and methods is inside the pod and is returning errors such as " '_xBounds' inaccessible due to 'internal' protection level" and "'shouldDrawValues' is inaccessible due to 'internal' protection level" (both are inside the class BarLineScatterCandleBubbleRenderer.

I know I can go inside the pod files and change it but using Cocoapods to include Charts and modifying the source is not really an option for my project. I can probably also fork the repository and use the manual install of the library but I'd rather use the Cocoapods approach if possible. Does anyone have any ideas on how to access/override those variables/methods?

>All comments

copy the class to your new renderer

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sjdevlin picture sjdevlin  Â·  3Comments

anhltse03448 picture anhltse03448  Â·  3Comments

guoyutaog picture guoyutaog  Â·  3Comments

kwstasna picture kwstasna  Â·  3Comments

cilasgimenez picture cilasgimenez  Â·  4Comments