-
-
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
Change color of Bar chart data label #2573
Comments
/// List representing all colors that are used for drawing the actual values for this DataSet
open var valueColors = [NSUIColor]()
/// the font for the value-text labels
var valueFont: NSUIFont { get set } how /// - returns: The color at the specified index that is used for drawing the values inside the chart. Uses modulus internally.
open func valueTextColorAt(_ index: Int) -> NSUIColor
{
var index = index
if index < 0
{
index = 0
}
return valueColors[index % valueColors.count]
} please check ChartsDemo.. it's all there, and |
@liuxuan30 This changes the color/font in the chart, but the Label under the chart is not changed and remains black and in default font. |
do you mean the x axis values? The are the same idea. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I write this code:
The small box under the graph is turned green, but the text that says "Test" is still a black color, I've tried to change the color and font in many ways with no success.
So how to I change the bar chart data label color/font?
The text was updated successfully, but these errors were encountered: