This project has moved. For the latest updates, please go here.

Scatter Chart Creation.

Jul 28, 2011 at 8:08 PM

I'm trying to create a scatter chart with the Data in Cells "C2:D62" using this code

var chart = (ThisWorkSheet.Drawings.AddChart("ScatterPlot", eChartType.XYScatter) as ExcelScatterChart);
chart.Title.Text = "Total";           
chart.SetPosition(0, 0, 5, 5);            
chart.SetSize(600, 600);
var ser = (chart.Series.Add("C2:D62","C1:D1") as ExcelScatterChartSerie);            
ThisWorkSheet.View.PageLayoutView = false;

The File Is created, (And the data is in the cells I expect) but The Chart isn't working, I'm getting an error

The Reference Is not valid. references for titles, values, or sizes must be a single cell, row, or column.


So how do you select the two rows/columns for a xy scatter plot?