EasyXLS
http://forum.easyxls.com/

How to add a trendline on column chart?
http://forum.easyxls.com/viewtopic.php?f=5&t=2189
Page 1 of 1

Author:  jackyliu [ Mon Mar 25, 2013 10:45 pm ]
Post subject:  How to add a trendline on column chart?

Hi, I am using EasyXLS 8.3 , and wanna create a column chart with trendline. However, I cant find class about trendline in the API document. Does EasyXLS support trendline on chart?

Author:  oana [ Tue Mar 26, 2013 6:37 am ]
Post subject:  Re: How to add a trendline on column chart?

Hi! EasyXLS preserves macros. You can create a template file having macro code behind that adds trendline, then load the file and add the data and the charts to it.

Here is a sample code for the macro
Code:
Private Sub Workbook_Open()

    Dim serX As Series
   
    ActiveSheet.ChartObjects("Chart").Activate
    For Each serX In ActiveChart.SeriesCollection
    serX.Trendlines.Add
    Next

End Sub

Author:  jackyliu [ Tue Apr 09, 2013 5:16 am ]
Post subject:  Re: How to add a trendline on column chart?

Thank you for your reply.

I have another issue about adding reference line on the chart.
In Excel, there is a way to change chart type for the specified series.
[-]http://www.excel-easy.com/examples/images/pareto-chart/change-series-chart-type.png[/-]


If one series is set as column bar, another one is set as line.
Thus, chart with reference line can be displayed as below.
[-]http://peltiertech.com/Excel/pix1/AddLineHErrBarC5.gif[/-]

Does EasyXLS provide function like "Change Series Chart Type"?
Thank you.

Author:  oana [ Tue Apr 09, 2013 6:23 am ]
Post subject:  Re: How to add a trendline on column chart?

jackyliu wrote:
Thank you for your reply.

I have another issue about adding reference line on the chart.
In Excel, there is a way to change chart type for the specified series.
[-]http://www.excel-easy.com/examples/images/pareto-chart/change-series-chart-type.png[/-]


If one series is set as column bar, another one is set as line.
Thus, chart with reference line can be displayed as below.
[-]http://peltiertech.com/Excel/pix1/AddLineHErrBarC5.gif[/-]

Does EasyXLS provide function like "Change Series Chart Type"?
Thank you.


You are welcome. No, EasyXLS does not provide function like "Change Series Chart Type".

Page 1 of 1 All times are UTC - 4 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/