We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
now i want to custom a LimitLine with two labels
class CustomChartLimitLine: ChartLimitLine { @objc open var extraLabel = "" @objc public init(limit: Double, label: String, extraLabel: String) { super.init(limit: limit, label: label) self.extraLabel = extraLabel } }
then creat custom XAxisRenderer
open class CustomXAxisRenderer: XAxisRenderer { open override func renderLimitLines(context: CGContext) { // TODO: custom renderLimitLines super.renderLimitLines(context: context) } }
and set chartView
view.xAxisRenderer = CustomXAxisRenderer(viewPortHandler: view.viewPortHandler, xAxis: view.xAxis, transformer: view.getTransformer(forAxis: .left)) let midLimit = CustomChartLimitLine(limit: yesterdayPrice, label: yesterdayPrice.fractionDigitsStr, extraLabel: "") view.leftAxis.addLimitLine(midLimit)
after this renderLimitLines not called
Did I code it right? or anyone have a better idea
The text was updated successfully, but these errors were encountered:
No branches or pull requests
now i want to custom a LimitLine with two labels
then creat custom XAxisRenderer
and set chartView
after this renderLimitLines not called
Did I code it right? or anyone have a better idea
The text was updated successfully, but these errors were encountered: