Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dotted line in Excel chart

Status
Not open for further replies.

vvlad

Programmer
May 27, 2002
151
DE
Hi,

I have a C# application in which I create some charts in Excel. Everything fine, but I don't seem to find a way to draw a dotted line.

Code:
            Excel.ChartObjects ChartObjects1;
            Excel.ChartObject chartObject1;

            ChartObjects1 = (Excel.ChartObjects)this.ChartObjects(missing);
            chartObject1 = ChartObjects1.Add(100, 300, 300, 300);

            chartObject1.Name = "NewChartObject";
            chartObject1.Chart.ChartWizard(this.Range["I2", "M10"],
                missing, missing, missing, missing,
                missing, missing, "Demo Chart", "Values X", "Values Y", "");

            Excel.Series s = (Excel.Series)chartObject1.Chart.SeriesCollection(1);
            s.Name = "[red]First[/red]";
            s.ChartType = Excel.XlChartType.xlLine;
            chartObject1.Activate();

In this example I would like to draw the series called "First" as a dotted or dashed line. Is it possible?

Thanks.

vlad
 
I would start here.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
jmeckley

That was a very smart and helpful answer, thank you.

Don't think I didn't try it, I simply did not find a solution. Do you have one?

vlad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top