Skip to content
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

Display Attributed String on X-Axis #3941

Closed
jayeshkanzariya opened this issue Apr 10, 2019 · 1 comment
Closed

Display Attributed String on X-Axis #3941

jayeshkanzariya opened this issue Apr 10, 2019 · 1 comment

Comments

@jayeshkanzariya
Copy link

I want to display Attributed String on X-axis.is there any way for it?

@liuxuan30
Copy link
Member

liuxuan30 commented May 13, 2019

take this API as example:

    /// Draws a value at the specified x and y position.
    @objc open func drawValue(context: CGContext, value: String, xPos: CGFloat, yPos: CGFloat, font: NSUIFont, align: NSTextAlignment, color: NSUIColor)
    {
        ChartUtils.drawText(context: context, text: value, point: CGPoint(x: xPos, y: yPos), align: align, attributes: [NSAttributedString.Key.font: font, NSAttributedString.Key.foregroundColor: color])
    }

so if you need more, just provide a subclass imp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants