PC Review


Reply
Thread Tools Rate Thread

C#: XYScatter chart with smooth lines and no markers

 
 
Thilina Dampahala
Guest
Posts: n/a
 
      18th Dec 2008
I hv been working on a Office 2007 App level add-in project using VS2005,
..Net 2.0, VSTO for Office 2007 and Office 2007 Interopps. I want to draw a
XYScatter chart with smooth lines nad no markers.

Why, even if we set the ChartType to xlXYScatterSmoothNoMarkers you get
markers?
xlChart.ChartType =
Microsoft.Office.Interop.Excel.XlChartType.xlXYScatterSmoothNoMarkers;

Is there any way to change XYScatter line thickness?
 
Reply With Quote
 
 
 
 
Thilina Dampahala
Guest
Posts: n/a
 
      19th Dec 2008
OK....I got this matter solved after trying several combinations.

We can use Chart.ChartWizard() method, where in parameters we can mention
the chart type we want. Using Chart.ChartWizard() really reduces the amount
of code lines to be written.

Changing the thickness of the line is possible after obtaining a reference
to the line in the series.
Microsoft.Office.Interop.Excel.Series s =
(Microsoft.Office.Interop.Excel.Series)xlChart.SeriesCollection(1);
s.Format.Line.Weight = (float)0.25;

"Thilina Dampahala" wrote:


> I hv been working on a Office 2007 App level add-in project using VS2005,
> .Net 2.0, VSTO for Office 2007 and Office 2007 Interopps. I want to draw a
> XYScatter chart with smooth lines nad no markers.
>
> Why, even if we set the ChartType to xlXYScatterSmoothNoMarkers you get
> markers?
> xlChart.ChartType =
> Microsoft.Office.Interop.Excel.XlChartType.xlXYScatterSmoothNoMarkers;
>
> Is there any way to change XYScatter line thickness?

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C#: XYScatter chart with smooth lines and no markers Thilina Dampahala Microsoft Excel Programming 2 19th Dec 2008 01:31 AM
Excel chart smooth lines Simply_Red Microsoft Excel Discussion 0 25th Apr 2007 10:03 PM
How do print a chart with smooth lines? =?Utf-8?B?QW15Qzc5?= Microsoft Excel Charting 2 21st Mar 2007 03:47 PM
How do I smooth the lines around a pie chart? =?Utf-8?B?TWFyeSBCZXRo?= Microsoft Excel Charting 0 9th Oct 2006 03:39 PM
Yikes! All chart series lines above the correct Y-axis value markers! CJ Microsoft Excel Charting 2 14th Jun 2004 04:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:59 PM.