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.

Update Lib

Thread ID:

Created:

Updated:

Platform:

Replies:

132459 Sep 3,2017 10:08 AM Sep 5,2017 05:35 AM Xamarin.iOS 3
loading
Tags: SfChart
Roi Godelman
Asked On September 3, 2017 10:08 AM

Hi Syncfusion,
I update the lib and I have problem with CustomTooltopBehavior

I created CustomTooltopBehavior with image and lock the image by DateTime that the image with show only 
when the date is display and the image have tooltip when you click on the image 
and I draw the image on override DrawInContext
and I see that the code is working fine but I still don't see any images on the chart
can you help me with that?
Thanks, Roi

Iyyappan Mani [Syncfusion]
Replied On September 4, 2017 07:04 AM

Hi Roi Godelman,   
   
Sorry for the inconvenience. 
  
Due to internal architecture change, the sample which we updated previously will not work anymore and there is an alternate solution for your requirement by hooking ShouldBegin event in TapGesture instead of overriding the method.    
   
We have modified sample and achieved your requirement. Please find the sample from following location.   
   
Sample: http://www.syncfusion.com/downloads/support/forum/132459/ze/ChartAnnotation-1607197203
 
Please let us know, if you need further assistance on this. 
   
   
Thanks,   
Iyyappan M  


Roi Godelman
Replied On September 4, 2017 08:05 AM

Hi Syncfusion,

Thanks for the quick response 

and I still have a small issue 

In my project I have  x axis is DateTime and when I add the image I lock the image on specific date and I using your code that you send me before

so I use this code

 public NSDate XPosition
        {
            get { return xPosition; }
            set
            {
                xPosition = value;
                DateTime date = (DateTime)xPosition;
                seconds = TimeSpan.FromTicks(((DateTime)date).Ticks).TotalSeconds -
                TimeSpan.FromTicks((new DateTime(197011)).Ticks).TotalSeconds;
            }
        }
  


 public override void DrawInContext(CGContext ctx)
        {
            if (Chart != null && !Chart.Subviews.Contains(ImageView))
            {
                double x = Chart.PrimaryAxis.PointForValue(seconds);
                double y = Chart.SecondaryAxis.PointForValue(YPosition);
                ImageView.Frame = new CGRect(x, y, 4040);

                Chart.AddSubview(ImageView);
            }
            else
            {
                double x = Chart.PrimaryAxis.PointForValue(seconds);
                double y = Chart.SecondaryAxis.PointForValue(YPosition);
                ImageView.Frame = new CGRect(x, y, 4040);
            }

            base.DrawInContext(ctx);
        }
 


and my x value is a very high number that I can't use

it starts to happen after I update the lib

Thanks, Roi


Iyyappan Mani [Syncfusion]
Replied On September 5, 2017 05:35 AM

Hi Roi,   
    
Sorry for the inconvenience.   
    
Due to internal architecture change, we have achieved your requirement by changing the Type of XPosition property to DateTime. Please find the below code snippet.   
    
Code Snippet:   
    
CustomTooltipBehavior behavior = new CustomTooltipBehavior(imageView);
behavior.XPosition = new DateTime(2014, 1, 4);  
  
  
    
internal double xPos;    
    
private DateTime xPosition;   
        public DateTime XPosition
        {
            get { return xPosition; }
            set
            {
                xPosition = value;
                xPos = xPosition.ToOADate();
            }
        }  
  
  
    
Also, we have modified the sample based on your requirement. Please find the sample from below mentioned location.   
    
    
Regards,   
Iyyappan 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.

;