简体   繁体   中英

How to display value over the bar while tap on bar in Bar chart using ios charts?

I am trying to display selected bar value in bubble like this while tap on Bar. I have implemented chartView.drawMarkers = true; as suggested but still while i tap on particular bar its not shows value in bubble as shown in the image.

Please help me i stuck here. My coding language is objective-c not swift

Have you implemented the chart marker and assign it to chart view? Check out ChartsDemo's line chart view controller:

BalloonMarker *marker = [[BalloonMarker alloc] initWithColor:[UIColor colorWithWhite:180/255. alpha:1.0] font:[UIFont systemFontOfSize:12.0] insets: UIEdgeInsetsMake(8.0, 8.0, 20.0, 8.0)];
marker.minimumSize = CGSizeMake(80.f, 40.f);
_chartView.marker = marker;

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM