[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
    Product Structure
   [Expand]Getting Started
   [Expand]Spreadsheet Document
    Supported Formats
   [Expand]Cell Basics
    Defined Names
    Data Binding
    Data Validation
   [Expand]Data Presentation
   [Expand]Pivot Table Overview
   [Collapse]Charting Overview
     Chart Elements
     Creating a Chart Programmatically
    Find and Replace
   [Expand]Mail Merge
   [Expand]Visual Elements
    Themes and Templates
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Creating a Chart Programmatically

You can use the Spreadsheet Chart API to create charts and modify them in code.

The following table lists the most useful objects, properties and methods of the Spreadsheet Chart API with short descriptions.

Member Description
Worksheet.Charts Provides access to a collection of charts in a worksheet.
ChartType Lists values used to specify the chart subtypes.
Chart An embedded chart on a worksheet.
ChartObject.SelectData Specifies a worksheet range containing chart data and creates series with automatically selected type.
ChartObject.ChangeType Changes the type of the chart.
ChartObject.Series Provides access to the collection of Series objects.
ChartObject.Views Provides access to a collection of chart views used to plot data series of specific types.
ChartObject.Title Gets the title of the chart.
ChartObject.Legend Provides access to a chart legend.
Legend.CustomEntries Provides access to a collection of modified legend entries.
ChartObject.PrimaryAxes Provides access to a collection of primary axes.
Series.AxisGroup Gets or sets the group type for the axes which are used to plot the series data.
ChartView.DataLabels Provides access to options used to modify all data labels within a chart view.
Series.CustomDataLabels Provides access to a collection of data labels customized for specific data points or for the entire series.
ChartOptions.Protection Gets or sets the chart protection.
IWorkbook.ChartSheets Provides access to a collection of chart sheets contained in a workbook.
ChartSheet A separate sheet in a workbook that contains only a chart.
ChartSheet.Chart Provides access to the chart on the current chart sheet.
ChartSheet.ActiveView Provides access to an object that contains options to display and print a chart sheet.
ChartSheet.PrintOptions Provides access to options that control how the chart sheet is printed.
ChartSheet.HeaderFooterOptions Provides access to options which determine the chart sheet header and footer characteristics.
ChartSheet.Protect Protects chart sheet elements to prevent them from being changed by the user.

Expanded See Also

Is this topic helpful?​​​​​​​