This project has moved and is read-only. For the latest updates, please go here.

Scatter Chart

Jul 2, 2014 at 12:26 PM
Edited Jul 2, 2014 at 12:26 PM
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!