You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let set = BarChartDataSet(values: entries, label: "Test")
set.colors = [UIColor.green]
set.valueTextColor = UIColor.white
set.valueFormatter = IntegerValueFormatter()
let data = BarChartData(dataSet: set)
chart.data = data
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:
/// List representing all colors that are used for drawing the actual values for this DataSetopenvarvalueColors=[NSUIColor]()/// the font for the value-text labelsvarvalueFont:NSUIFont{getset}
how valueColors are being used:
/// - returns: The color at the specified index that is used for drawing the values inside the chart. Uses modulus internally.openfunc valueTextColorAt(_ index:Int)->NSUIColor{varindex= index
if index <0{
index =0}returnvalueColors[index % valueColors.count]}
please check ChartsDemo.. it's all there, and drawValues()
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: