-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to get a custom legend #710
Comments
@danielgindi is this another class you want to make public? |
yeah, I found that . but a little precious to this |
Here's a KVC solution for replacing the legend with custom legend: public class CustomCombinedChartView: CombinedChartView {
override public func initialize() {
super.initialize()
let customLegend = CustomLegendRenderer(viewPortHandler: viewPortHandler, legend: self.legend)
self.setValue(customLegend, forKey: "_legendRenderer")
}
} |
_legendRenderer is not a @objc property in Swift 4.0, so KVC is not work |
I subclass the ChartLegendRenderer , but how to use it. I notice that the legendRenderer is readonly
The text was updated successfully, but these errors were encountered: