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

Scatter Chart

Jul 2, 2014 at 11:26 AM
Edited Jul 2, 2014 at 11:26 AM
I have created a chart and the generated xls file looks very good in OpenOffice Calc, but not so well in MS OFfice. Here is my VB.NET code:

Dim chart As ExcelScatterChart = CType(chartWorksheet.Drawings.AddChart("Scatter Chart", eChartType.XYScatter), OfficeOpenXml.Drawing.Chart.ExcelScatterChart)
chart.SetSize(ChartHeightAndWidth, ChartHeightAndWidth)

Dim range1 As ExcelRange = dataWorksheet.Cells(String.Format("C1:C{0}", data.Count + 1))
Dim range2 As ExcelRange = dataWorksheet.Cells(String.Format("B1:B{0}", data.Count + 1))
Dim serie As ExcelScatterChartSerie = CType(chart.Series.Add(range1, range2), ExcelScatterChartSerie)
Any help is appreciated!