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

change line chart legend text color #3971

Closed
1 task done
FusionCDR opened this issue Apr 25, 2019 · 1 comment
Closed
1 task done

change line chart legend text color #3971

FusionCDR opened this issue Apr 25, 2019 · 1 comment

Comments

@FusionCDR
Copy link

FusionCDR commented Apr 25, 2019

What did you do?

I attempted to change the text colors of each of the legend entries.

What did you expect to happen?

I expected to be able to change each of the entries' text colors, in my case it would correspond like so:
Entry 1: "Solves", color: UIColor.blue
Entry 2: Average of Five", color: UIColor.orange

What happened instead?

I could not find the relevant customizable property that allowed for changes to the color of each label in the legend. Instead, there was one that changed the color of all labels at once (Chart.legend.textColor).

Charts Environment

Charts version/Branch/Commit Number: Version 3.3.0
Xcode version: 10.2.1
Swift version: 4
Platform(s) running Charts: iOS
macOS version running Xcode: Mojave

@FusionCDR FusionCDR changed the title change legend text color change line chart legend text color Apr 27, 2019
@liuxuan30
Copy link
Member

@objc open var font: NSUIFont = NSUIFont.systemFont(ofSize: 10.0)
@objc open var textColor = NSUIColor.black

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