Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Collapse]Spreadsheet
   [Expand]Product Information
    Product Structure
    Getting Started
   [Expand]Spreadsheet Document
    Supported Formats
   [Expand]Cell Basics
   [Expand]Spreadsheet Formulas
    Defined Names
    Data Binding
    Data Validation
   [Expand]Data Presentation
    Data Grouping
   [Expand]Pivot Table Overview
   [Collapse]Charting Overview
     Chart Elements
     Creating and Modifying a Chart Programmatically
    Printing
    Events
   [Expand]Mail Merge Overview
    Protection
    Find and Replace
   [Expand]Visual Elements
    Services
   [Expand]Shortcuts
   [Expand]Examples
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Creating and Modifying 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

How would you rate this topic?​​​​​​​