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. Image for the cookie policy date

Update Lib

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

3 Replies

IM Iyyappan Mani Syncfusion Team September 4, 2017 11:04 AM UTC

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  



RG Roi Godelman September 4, 2017 12:05 PM UTC

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



IM Iyyappan Mani Syncfusion Team September 5, 2017 09:35 AM UTC

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.   


Loader.
Up arrow icon