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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Placing an annotation below a series.

Thread ID:

Created:

Updated:

Platform:

Replies:

125946 Sep 13,2016 08:47 PM UTC Sep 14,2016 07:37 AM UTC UWP 1
loading
Tags: SfChart
Tim Rawlinson
Asked On September 13, 2016 08:47 PM UTC

Hi,

I would like to place an annotation below a series in a chart. Setting the Canvas.ZIndex of the annotation in concert with that of the series seems to have no effect. I suppose I could implement the annotation (a HorizontalLineAnnotation in this case) with a new series and arrange them that way, but am hoping a nicer solution is possible. Any suggestions?

Thanks

Tim Rawlinson

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On September 14, 2016 07:37 AM UTC

Hi Tim, 
  
Thanks for contacting Syncfusion Support. 
  
We can achieve your requirement by overriding the OnApplyTemplate in SfChart class. Please find the code snippet below, 
  
 
protected override  void OnApplyTemplate() 
   { 
      // Canvas.ZIndexProperty is set to SeriesAnnotationCanvas 
      (GetTemplateChild("Part_SeriesAnnotationCanvas") as     
                               Canvas).SetValue(Canvas.ZIndexProperty, -1); 
       base.OnApplyTemplate(); 
    } 
  
We have prepared a demo sample for your reference and it can be downloaded from below link, 
  
  
Regards, 
Devi 


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.

Warning Icon 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.Close Icon

;