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
close icon

How can I display a polynomial on a graph?

Is there anyway I can display a polynomial on an SfChart?

3 Replies

MK Muneesh Kumar G Syncfusion Team December 17, 2018 05:20 AM UTC

Hi Alfie, 
 
Greetings, we have analyzed your requirement and you can achieve this by using Trendlines for series as per the below code snippet. 
 
Code snippet 
<syncfusion:FastLineSeries XBindingPath="Date" 
 
YBindingPath="Value"  Interior="#7F7F7F" ItemsSource="{Binding StockPriceDetails}"> 
 
<syncfusion:FastLineSeries.Trendlines> 
 
<syncfusion:Trendline Stroke="Black" Type="Polynomial"/> 
 
</syncfusion:FastLineSeries.Trendlines> 
 
</syncfusion:FastLineSeries> 
 
Please refer below user documentation for more details about trendlines and its Polynomial type.  
 
 
Please let us know if you have any queries.  
 
Thanks, 
Muneesh Kumar G. 



AD Alfie Douglas December 17, 2018 09:21 AM UTC

Is there anyway I can plot a polynomial without having the original data?


MK Muneesh Kumar G Syncfusion Team December 17, 2018 10:30 AM UTC

Hi Alfie, 
 
We have analyzed your requirement and we suspect that your requirement is to see only polynomial line in SfChart. You can achieve this by setting series’s Interior as Transparent as per the below code snippet.  
 
Code snippet 
<chart:FastLineBitmapSeries XBindingPath="XValue" YBindingPath="YValue" 
                                    Interior="Transparent"   ItemsSource="{Binding Data}"> 
                <chart:FastLineBitmapSeries.Trendlines> 
                    <chart:Trendline Type="Polynomial"/> 
                </chart:FastLineBitmapSeries.Trendlines> 
            </chart:FastLineBitmapSeries> 
 
Screenshot: 
 
If your requirement different from this, please give more information (pictorial representation) about your requirement that would be helpful for us to give better solution in this.  
 
Thanks, 
Muneesh Kumar G. 


Loader.
Live Chat Icon For mobile
Up arrow icon