alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class ChartModel

    Represents the properties of a chart that can be inserted into a worksheet.

    Inheritance
    object
    ChartModel
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.Spreadsheet
    Assembly: Syncfusion.Blazor.Spreadsheet.dll
    Syntax
    public class ChartModel
    Remarks

    This class defines the chart configuration settings used to create and insert a chart programmatically, including chart type, data range, series orientation, and theme.

    Constructors

    ChartModel()

    Declaration
    public ChartModel()

    Properties

    ChartType

    Gets or sets the type of chart to be inserted.

    Declaration
    public string ChartType { get; set; }
    Property Value
    Type Description
    string

    A string that specifies the chart type (e.g., "Column", "Bar", "Line", "Pie", "Area").

    Remarks

    The specified chart type must be a supported type available in the spreadsheet UI. Invalid chart types will be ignored.

    Id

    Gets or sets the unique identifier of the chart.

    Declaration
    public string Id { get; set; }
    Property Value
    Type Description
    string

    A string that uniquely identifies the chart within the workbook.

    Remarks

    This identifier is used to distinguish the chart from other charts and is required for chart operations such as deletion or modification.

    IsSeriesInRows

    Gets or sets a value indicating whether chart data series are derived from rows or columns.

    Declaration
    public bool IsSeriesInRows { get; set; }
    Property Value
    Type Description
    bool

    When set to true, each row represents a separate data series; otherwise, each column represents a separate data series. The default value is false.

    Remarks

    This property determines how the data in the specified Range is interpreted when generating the chart series.

    Range

    Gets or sets the cell range that provides the data for the chart series.

    Declaration
    public string Range { get; set; }
    Property Value
    Type Description
    string

    A string that specifies the worksheet range in A1 notation (e.g., "A1:B10" or "Sheet2!C3:D15").

    Remarks

    The specified range should contain the data to be plotted in the chart. If no range is specified, the chart is generated from the currently selected range.

    Theme

    Gets or sets the theme applied to the chart.

    Declaration
    public string Theme { get; set; }
    Property Value
    Type Description
    string

    A string that specifies the chart theme (e.g., "Material", "Office", "Bootstrap"). The default value is "Material".

    Remarks

    If the specified theme is unavailable or invalid, the default theme is applied instead.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved