LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default C#: XYScatter chart with smooth lines and no markers

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. Here is a sample from my
code....(NB: Im just copy and paste the code from IDE here...so there are
variables appear here, but defined outside the this code sample....so plz
ignore them)

Microsoft.Office.Interop.Excel.ChartObjects charts =
(Microsoft.Office.Interop.Excel.ChartObjects)ws.Ch artObjects(Type.Missing);
Microsoft.Office.Interop.Excel.ChartObject chart =
charts.Add(110, 40, 600, 300);
Microsoft.Office.Interop.Excel.Chart xlChart = chart.Chart;
Microsoft.Office.Interop.Excel.Range rg;
int end = values.Length + 1;
rg = ws.get_Range("A2", "B" + end.ToString());

xlChart.Legend.Clear();

Microsoft.Office.Interop.Excel.Axis x;
x =
(Microsoft.Office.Interop.Excel.Axis)xlChart.Axes( Microsoft.Office.Interop.Excel.XlAxisType.xlCatego ry,
Microsoft.Office.Interop.Excel.XlAxisGroup.xlPrima ry);
x.HasTitle = true;
x.AxisTitle.Text = "Time";

Microsoft.Office.Interop.Excel.Axis y;
y =
(Microsoft.Office.Interop.Excel.Axis)xlChart.Axes( Microsoft.Office.Interop.Excel.XlAxisType.xlValue,
Microsoft.Office.Interop.Excel.XlAxisGroup.xlPrima ry);
y.HasTitle = true;
y.AxisTitle.Text = "Forecasted Value";

xlChart.ChartType =
Microsoft.Office.Interop.Excel.XlChartType.xlXYSca tterSmoothNoMarkers;
xlChart.SetSourceData(rg, Type.Missing);


The above code always draws a XYScatter with smmoth lnes but with markers?
What could be the problem?

How to programatically specify the thickness of the scatter line?


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
C#: XYScatter chart with smooth lines and no markers Thilina Charts and Charting in Excel 1 December 19th 08 01:38 AM
How does Excel smooth chart data when smooth option is selected? Larry Charts and Charting in Excel 1 April 19th 07 05:40 AM
How do print a chart with smooth lines? AmyC79 Charts and Charting in Excel 2 March 21st 07 03:47 PM
How do I smooth the lines around a pie chart? Mary Beth Charts and Charting in Excel 0 October 9th 06 03:39 PM
How do I make the lines "smooth" in my 3-d pie chart? penneb Charts and Charting in Excel 0 April 15th 05 05:55 PM


All times are GMT +1. The time now is 05:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"