How can I draw a custom selected point label? (1)


#1

Hi, 

I would like to draw a label as shown in the picture below. 

Thanks


#2

Hi Sandu. Thanks for getting in touch. Are you working with ShinobiCharts for Android or iOS?

Thanks.


#3

Hi Kai, I’m working for iOS. 

Thanks


#4

Hi Sandu,

Have you seen our crosshair/tooltip feature? It allows a user to show a tooltip for data points much like the one you have in your screenshot.

You can see some documentation on this here http://www.shinobicontrols.com/docs/ShinobiControls/ShinobiCharts/2.7.0/Premium/Normal/user_guide.html#Crosshair

Let us know if this doesn’t meet your requirements or if you’d like some more info.  :laughing:

Thanks

Ryan


#5

If you happen to be using Xamarin, I can give you a code example.


#6

Hy Ryan,

Yes, I see the crosshair functionality. I would draw an custom label for selected point.

I tried to set   showLabels  for selected point, but nothing happened. 

SChartLineSeries *series =[[SChartLineSeries alloc] init];

series.style.selectedPointStyle.showPoints = YES;

series.selectedStyle.dataPointLabelStyle.showLabels = YES;

…for example code , it drew only selected point. 

Thanks.


#7

Hi Sandu,

In this case you might find the SChartAnnotation class useful - this allows you to place an annotation at any point on the chart - there are several convenience initialisers you can choose from that might come in handy :slight_smile:

Best regards,

Rob