Rectangle annotation

Hi sync team!
I'd like to know how I can create a rectangle annotation to fill the space between my two horizontal line annotations:

This is what I have vs What I need


This is the code of my two line annotations.

<chart:SfChart.ChartAnnotations>
<chart:HorizontalLineAnnotation Y1="70" CoordinateUnit="Axis" ShowAxisLabel="False" StrokeWidth="5" StrokeColor="{DynamicResource LowGlucose}" />
<chart:HorizontalLineAnnotation Y1="170" CoordinateUnit="Axis" ShowAxisLabel="False" StrokeWidth="5" StrokeColor="{DynamicResource HighGlucose}" />
</chart:SfChart.ChartAnnotations>


3 Replies

SJ Suyamburaja Jayakumar Syncfusion Team December 10, 2020 11:52 AM UTC

Hi Jorge Valenzuela, 
 
Greetings from Syncfusion.  
 
Your requirement “filling the rectangle” has been achieved by using the StripLine, please refer to the below code snippet. 
 
XAML: 
<chart:SfChart.SecondaryAxis> 
                <chart:NumericalAxis> 
                    <chart:NumericalAxis.StripLines> 
                        <chart:NumericalStripLine Start="50" Width ="75" FillColor="#c0fbfc"> 
                        </chart:NumericalStripLine> 
                    </chart:NumericalAxis.StripLines> 
                </chart:NumericalAxis> 
            </chart:SfChart.SecondaryAxis> 
 
More information please refer the below UG link, 
 
 
Screenshot: 
 
 
Please let us know if you need any further assistance. 
 
Regards, 
Suyamburaja J. 



JV Jorge Valenzuela December 10, 2020 01:01 PM UTC

Thank you very much for your great support, this is exactly what I needed!

Best regards.


HM Hemalatha Marikumar Syncfusion Team December 11, 2020 06:32 AM UTC

 Hi Jorge Valenzuela, 
 
Thanks for your update. We are glad hear that your requirement has been achieved. 
 
Regards,
Hemalatha M.
 


Loader.
Up arrow icon