C#: XYScatter chart with smooth lines and no markers

  • Thread starter Thread starter Anon
  • Start date Start date
A

Anon

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?
 
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;


> 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?
 
Back
Top