Hi! I recently started creating my bar chart using the Macaw library. This is a wonderful library and I’ve had a great time exploring it’s features! Since I am very new to using this I ran into some trouble trying to figure out how to reload my chart with new data. To be more specific, essentially I want to make a selection in a tableView and, depending on the selection, I want the appropriate data to be loaded. So, the graph will be data and color of the bar chart will be refreshed depending on the tableView selection. I was trying to go through the documentation to see if there was some sort of refresh or reload chart method, however was not able to find anything. I would really appreciate if you can help me out! Thank you!
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
selectedEmotion.setTitle(dataSource[indexPath.row], for: .normal)
if (dataSource[indexPath.row].caseInsensitiveCompare("Sad") == ComparisonResult.orderedSame) {
// I am trying to do something like this:
// MacawChartView.reloadChart(color1: 0x223B6F, color2: 0x8CBFD7)
}
else {
// MacawChartView.reloadChart(color1: 0x6DC3BA, color2: 0xCA9B82)
}
ChartView.playAnimations()
}
Hi! I recently started creating my bar chart using the Macaw library. This is a wonderful library and I’ve had a great time exploring it’s features! Since I am very new to using this I ran into some trouble trying to figure out how to reload my chart with new data. To be more specific, essentially I want to make a selection in a tableView and, depending on the selection, I want the appropriate data to be loaded. So, the graph will be data and color of the bar chart will be refreshed depending on the tableView selection. I was trying to go through the documentation to see if there was some sort of refresh or reload chart method, however was not able to find anything. I would really appreciate if you can help me out! Thank you!