We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Add label to datapoint

Thread ID:

Created:

Updated:

Platform:

Replies:

128302 Jan 12,2017 05:11 PM Jan 19,2017 01:49 AM Xamarin.Android 9
loading
Tags: SfChart
Martin Dusek
Asked On January 12, 2017 05:11 PM

Hello,
in Xamarin.Android I have FastLineSerie where I plot real time data from sensor.

I want to add a label to 5th datapoint of the serie.

Then some new data are added to the serie as they arrived from the sensor. The label must remain at the 5th datapoint.

Then after some time I want to remove the label.

Thanks for the advice.

Martin Dusek
Replied On January 12, 2017 05:13 PM

Sorry, this is exactly what I want:

I want to add a label to 5th datapoint of the serie.

Then some new data are added to the serie as they arrived from the sensor. The label must remain at the 5th datapoint.

Then after some time I want to remove the label.

Then after some time I want to add a label to 6th datapoint of the serie.

Saravana Pandian Murugan [Syncfusion]
Replied On January 13, 2017 10:28 AM

Hi Martin,

Thanks for contacting Syncfusion support.

We have prepared a sample based on your requirement using DataMarkerLabelCreated event which can be downloaded from the below location.

Sample : http://www.syncfusion.com/downloads/support/forum/128302/ze/DataMarkerSample-616955935  

Please check and let us know if you need further assistance.

Thanks,
Saravana Pandian M.
 


Martin Dusek
Replied On January 16, 2017 03:08 PM

Hello,
thanks. Is it possible to optimize this? In my case, I plot up to 20 series, each with 180 datapoints. With this setup, my GUI becomes unresponsive when the chart has labels enabled.

If it is not possible to optimize it: Is it possible to get x and y coordinates of datapoint relative to chart coordinate system? I would then be able to draw my own graphics on top of the chart (I would display label at last datapoint coordinates which should be fast).

Best regards

Martin

Yuvaraj Palanisamy [Syncfusion]
Replied On January 17, 2017 09:53 AM

Hi Martin,

We are not able to reproduce the issue and we have modified the sample as per your requirement. Please update us the modified sample to reproduce the issue which will be helpful for providing further assistance on this.

Sample: http://www.syncfusion.com/downloads/support/forum/128302/ze/DataMarkerSample-1815646281  

Regards,
Yuvaraj 


Martin Dusek
Replied On January 17, 2017 01:25 PM

What device do you try this sample on?

On WinMate M700DM8 and on LG G3 I get hardly one iteration of while loop in UpdateData method per 3 seconds (it should iterate roughly once per second). Both devices are obviously very busy redrawing labels in chart.

If I reduce number of series from 20 to 5, then both devices are able to iterate while loop in UpdateData method roughly once per second.

Or is there any optimization I have to turn on in my devices?

Magesh Kumar Krishnan [Syncfusion]
Replied On January 18, 2017 09:25 AM

Hi Martin, 
  
We can achieve your requirement by using ValueToPoint method of ChartAxis. We have prepared sample based in this. Please download the sample from location given below. 
  
  
Regards, 
Magesh 


Martin Dusek
Replied On January 18, 2017 01:08 PM

Hello,
thanks but unfortunately, I can't compile the project.

On line 303 there is error:

Error CS7036 There is no argument given that corresponds to the required formal parameter 'javaReference' of 'FastLineSegment.FastLineSegment(IntPtr, JniHandleOwnership)' DataMarkerSample C:\DataMarkerSample264781638\DataMarkerSample\MainActivity.cs 303 Active

I use 14.4.0.20 Syncfusion.Xamarin.SfChart.Android nuget package.

Martin Dusek
Replied On January 18, 2017 04:41 PM

Dear Magesh,
thank you very much. That's exactly what I need!

Best regards

Martin

Saravana Pandian Murugan [Syncfusion]
Replied On January 19, 2017 01:49 AM

Hi Martin,

Thanks for using Syncfusion products.

We have created a new incident under your Direct Trac account. We suggest you to follow up the incident for further reference using your direct trac account. 

DirectTrack Account Login : https://www.syncfusion.com/account/login   

Please let us know if you have any concerns.

Regards,
Saravana Pandian M.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;