ivnsch / SwiftCharts

Easy to use and highly customizable charts library for iOS
Apache License 2.0
2.53k stars 410 forks source link

Programmatically select a bar #332

Closed Diogo72 closed 6 years ago

Diogo72 commented 6 years ago

Hi. I've been trying to select a bar programmatically, but it seems like I don't have access to the bars' views when they aren't tapped. I'm able to change the background color when it's tapped, but I also want to change it when some other events occur in my app (also pan to it, but that I've already figured out).

Diogo72 commented 6 years ago

I found a solution for this. You can access the bars by going to the subviews of the chart's contentView.

ivnsch commented 6 years ago

If you use master you also can access the bars from the layers directly bf96825e4eaf27ae4612045cb2140c055846c174