is there a way to add two text values one above and one below bar chart as shown in the image
Thanks in advance
You can combine two (and more) different values using \\n symbol as delimiter on data preparing step. Or use IAxisValueFormatter for more control. Something like this for example:
extension ChartController: IAxisValueFormatter {
func stringForValue(_ value: Double, axis: AxisBase?) -> String {
if axis is XAxis {
return "Sting 1\nString2"
}
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.