width of a trendline

L

Luis D Rojas

Hi
i need to know how to change the width of a trendline
Besides, i need to do the same for a scatter line type serie

thanks in advance
 
A

Alvin Bruney [MVP]

A trendline returns a chline object. This object exposes customizations that
may be applied to the trendline itself. My new book goes into a lot more
detail on how to customize and implement custom trendlines as well as how to
manipulate the natively supported trendline. but roughly you would do
something like this:

obtain a handle to the trendline object
obtain the chline object from the trendline object
obtain the weight object exposed by the chline object
use an appropriate weight constant to set the weight of the line

the line weight only responds to valid constances and not to user-defined
constances.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://tinyurl.com/27cok
 
L

Luis D Rojas

Thanks for your help
I found out how to do it.
I´m working with C# and OWC10. This is the code for getting that done, for
the chart series and for the trend line

cht.SeriesCollection[0].Line.set_Weight(
OWC10.LineWeightEnum.owcLineWeightThin );

cht.SeriesCollection[0].Trendlines[0].Line.set_Weight(
OWC10.LineWeightEnum.owcLineWeightMedium );

It does not matter that set_Weight Method is not "exposed" through your
intellisense, it can be used, it compiles and works.

Hope this helps!



Alvin Bruney said:
A trendline returns a chline object. This object exposes customizations that
may be applied to the trendline itself. My new book goes into a lot more
detail on how to customize and implement custom trendlines as well as how to
manipulate the natively supported trendline. but roughly you would do
something like this:

obtain a handle to the trendline object
obtain the chline object from the trendline object
obtain the weight object exposed by the chline object
use an appropriate weight constant to set the weight of the line

the line weight only responds to valid constances and not to user-defined
constances.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://tinyurl.com/27cok
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top