HTML JPG PDF XML XLSX
  Product Family
XLSX

Create Line Charts via C#

Native and high performance MS Excel Charts creation programmatically using server side .NET APIs.

Creating Line Charts dynamically within running application is easy. In order to create variety of charts to spreadsheets from scratch without requiring MS Office, we’ll use Aspose.Cells for .NET API that offers different features for spreadsheets creation, manipulation and conversion using .NET platform. Aspose.Cells provides many flexible chart objects.

How to Create Line Charts via C#

It is easy for the developers to create a line chart within running different reporting applications for data processing in just a few lines of code.

  1. Include Aspose.Cells namespace
  2. Create Workbook class instance.
  3. Add some data to worksheet.
  4. Add a Line Chart to the worksheet.
  5. Access the new Chart  object.
  6. Specify the chart’s data source with Chart.SetChartDataRange method.

System Requirements

Just make sure that system have Microsoft Windows or a compatible OS with .NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms as well as development environment like Microsoft Visual Studio.

  • Install from command line as nuget install Aspose.Cells or via Package Manager Console of Visual Studio with Install-Package Aspose.Cells.
  • Alternatively, get the offline MSI installer or all DLLs in a ZIP file from downloads
 

Following source code shows how to create a Line Chart to MS Excel XLSX file using C#.