Hi,
Thank you for considering Aspose.
Please set the chart.NSeries[1].Line.IsVisible = true; to show the line. Please see the following updated code for your reference,
chart.NSeries.Add(worksheet.Name + "!B2:" + cellName, true);
chart.NSeries.CategoryData = worksheet.Name + "!A2:A" + rowcount;
chart.NSeries[1].Type = ChartType.Line;
chart.NSeries[1].PlotOnSecondAxis = true;
chart.SecondValueAxis.IsVisible = true;
chart.NSeries[1].Line.IsVisible = true;
chart.NSeries[1].Line.Color = System.Drawing.Color.DarkBlue;
chart.NSeries[1].MarkerStyle = ChartMarkerType.Circle;
chart.NSeries[1].MarkerBackgroundColor = System.Drawing.Color.DarkBlue;
chart.NSeries[1].MarkerForegroundColor = System.Drawing.Color.DarkBlue;
chart.NSeries[1].MarkerSize = 5;
Thank You & Best Regards,
Nausherwan Aslam
Support Developer,
Aspose Sialkot Team
Contact Us