Reply to topic  [ 4 posts ] 
How to add a trendline on column chart? 
Author Message

Joined: Fri Aug 08, 2008 1:49 am
Posts: 6
Reply with quote
Post 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?


Mon Mar 25, 2013 10:45 pm
Profile

Joined: Wed Nov 07, 2007 4:42 am
Posts: 59
Reply with quote
Post 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


Tue Mar 26, 2013 6:37 am
Profile WWW

Joined: Fri Aug 08, 2008 1:49 am
Posts: 6
Reply with quote
Post 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.


Tue Apr 09, 2013 5:16 am
Profile

Joined: Wed Nov 07, 2007 4:42 am
Posts: 59
Reply with quote
Post 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".


Tue Apr 09, 2013 6:23 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.