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.
Syncfusion Feedback

Add trendline in a chart with XlsIO

Thread ID:

Created:

Updated:

Platform:

Replies:

125226 Aug 1,2016 09:54 AM UTC Aug 3,2016 04:21 AM UTC ASP.NET Web Forms 6
loading
Tags: XlsIO
Juan
Asked On August 1, 2016 09:54 AM UTC

As I can add trendline on a chart made with XlsIO?

Thanks.

Abirami Varadharajan [Syncfusion]
Replied On August 2, 2016 05:05 AM UTC

Hi Juan, 
 
Thank you for contacting Syncfusion support. 
 
Yes, you can add trendline to the chart created using XlsIO. Kindly refer the below code snippet to achieve your requirement. 
 
Code Example: 
       chart.Series(0).TrendLines.Add(ExcelTrendLineType.Linear); 
 
We have also shared a sample for your reference, which can be downloaded from the following location. Kindly refer to this and let us know if it helps. 
 
 
Regards, 
Abirami. 


Juan
Replied On August 2, 2016 05:38 AM UTC

Perfect!
Thank you so much for your help.

Juan
Replied On August 2, 2016 05:44 AM UTC

A question more ... How can I put color to the trendline?

Thanks.


Abirami Varadharajan [Syncfusion]
Replied On August 2, 2016 09:25 AM UTC

Hi Jaun, 
 
Thank you for updating us. 
 
Query 
Details 
How can I put color to the trendline? 
Kindly refer the below code for formatting the trendline. 
 
Code Example: 
        chart.Series(0).TrendLines(0).Border.LineColor = Color.Aquamarine 
        chart.Series(0).TrendLines(0).Border.LinePattern = ExcelChartLinePattern.Dash 
        chart.Series(0).TrendLines(0).Border.LineWeight = 3 
 
 
Please let us know if you have any concerns. 
 
Regards, 
Abirami. 


Juan
Replied On August 2, 2016 09:31 AM UTC

Thank you very much for your quick response.

It has worked perfectly!

Thank you.


Abirami Varadharajan [Syncfusion]
Replied On August 3, 2016 04:21 AM UTC

Hi Juan, 
 
We are glad that your requirement is fulfilled. Please let us know if you need any further assistance. 
 
Regards, 
Abirami. 


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

;