// Create a line chart for trend analysis
var lineChart = ws.CreateChart(ChartType.Line, 10, 22, 25, 32);
// Add data series with smooth lines
var trendSeries = lineChart.AddSeries("A2:A7", "B2:B7");
trendSeries.Title = "Q1 Sales Trend";
// Customize chart appearance
lineChart.SetTitle("Quarterly Sales Trend Analysis");
lineChart.SetLegendPosition(LegendPosition.Right);
// You can also create combination charts
var comboChart = ws.CreateChart(ChartType.ColumnClustered, 27, 15, 42, 25);
comboChart.AddSeries("A2:A7", "B2:B7"); // Column series
comboChart.AddSeries("A2:A7", "C2:C7"); // Can be styled as line
comboChart.Plot();
' Create a line chart for trend analysis
Dim lineChart = ws.CreateChart(ChartType.Line, 10, 22, 25, 32)
' Add data series with smooth lines
Dim trendSeries = lineChart.AddSeries("A2:A7", "B2:B7")
trendSeries.Title = "Q1 Sales Trend"
' Customize chart appearance
lineChart.SetTitle("Quarterly Sales Trend Analysis")
lineChart.SetLegendPosition(LegendPosition.Right)
' You can also create combination charts
Dim comboChart = ws.CreateChart(ChartType.ColumnClustered, 27, 15, 42, 25)
comboChart.AddSeries("A2:A7", "B2:B7") ' Column series
comboChart.AddSeries("A2:A7", "C2:C7") ' Can be styled as line
comboChart.Plot()