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

Smoothed Line VB

Apr 14, 2014 at 10:14 AM
Hi,

Every time I add a line graph it sets it as a 'smooth line'. how do I change this so it is a straight line between each point using VB?
Dim chtPre = objWorksheetChartPre.Drawings.AddChart("PreLineChart", Chart.eChartType.ColumnClustered)
        chtPre.DisplayBlanksAs = Chart.eDisplayBlanksAs.Gap

        chtPre.Series.Add(ExcelRange.GetFullAddress("Data", "D3:D" & iRow2013.ToString), ExcelRange.GetFullAddress("Data", "A3:A" & iRow2013.ToString)).Header = "score 1"


        chtPre.Title.Text = "Pre Chart"
        chtPre.SetSize(1200, 800)
Thanks
Apr 14, 2014 at 10:18 AM
ClassyBear wrote:
Dim chtPre = objWorksheetChartPre.Drawings.AddChart("PreLineChart", Chart.eChartType.ColumnClustered)
        chtPre.DisplayBlanksAs = Chart.eDisplayBlanksAs.Gap
Where this says Chart.eChartType.ColumnClustered I meant Chart.eChartType.Line.

Thanks
Apr 29, 2014 at 5:10 PM
Worked it out. Download the latest version as this was a bug in EPPlus. Also I should have declared chtpost as ExcelLineChart and imported Imports OfficeOpenXml.Drawing.Chart

Hope this helps someone else.

Thanks,
Marked as answer by ClassyBear on 4/29/2014 at 9:10 AM