alexa
Syncfusion
menu Syncfusion

Blazor

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

    Show / Hide Table of Contents

    Class ChartOptions

    Represents a set of options used to update an existing chart in the spreadsheet.

    Inheritance
    object
    ChartOptions
    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 ChartOptions
    Remarks

    An empty string for a title clears that title. Unrecognized chart type, theme, legend, or data label strings are ignored for that field only.

    A null value for most properties leaves the current setting unchanged.

    Constructors

    ChartOptions()

    Declaration
    public ChartOptions()

    Properties

    ChartTitle

    Gets or sets the chart title.

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

    A string representing the chart title text.

    Remarks

    A null value leaves the title unchanged. An empty or whitespace value removes the chart title.

    ChartType

    Gets or sets the chart type to apply.

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

    A ChartType value that specifies the chart type.

    Remarks

    A null value leaves the chart type unchanged.

    ColorPalette

    Gets or sets the custom color palette applied to the chart series.

    Declaration
    public string[] ColorPalette { get; set; }
    Property Value
    Type Description
    string[]

    An array of CSS color strings (for example, "#4472C4").

    Remarks

    Colors are applied sequentially to chart series. When the number of series exceeds the number of colors, the colors are reused in order. A null or empty array removes the custom palette and uses the chart theme colors.

    DataLabelPosition

    Gets or sets the data label position.

    Declaration
    public DataLabelPosition? DataLabelPosition { get; set; }
    Property Value
    Type Description
    DataLabelPosition?

    A DataLabelPosition value that specifies where data labels are displayed.

    Remarks

    A null value leaves the current data label settings unchanged. Specify None to hide the data label.

    Id

    Gets or sets the identifier of the chart to update.

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

    A string that uniquely identifies the chart.

    Remarks

    Matches the identifier assigned when the chart was inserted, with or without the worksheet-name prefix.

    LegendPosition

    Gets or sets the legend position.

    Declaration
    public LegendPosition? LegendPosition { get; set; }
    Property Value
    Type Description
    LegendPosition?

    A LegendPosition value that specifies where the legend is displayed.

    Remarks

    A null value leaves the legend unchanged. Specify None to hide the legend.

    PrimaryHorizontalAxisTitle

    Gets or sets the primary horizontal axis title.

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

    A string representing the horizontal axis title.

    Remarks

    A null value leaves the current title unchanged. An empty value removes the axis title.

    PrimaryVerticalAxisTitle

    Gets or sets the primary vertical axis title.

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

    A string representing the vertical axis title.

    Remarks

    A null value leaves the current title unchanged. An empty value removes the axis title.

    Range

    Gets or sets the data range used to regenerate the chart series.

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

    A string representing a worksheet range in A1 notation.

    Remarks

    A null value leaves the current chart range unchanged.

    ShowPrimaryHorizontalAxis

    Gets or sets a value indicating whether the primary horizontal axis is visible.

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

    true to display the primary horizontal axis; otherwise, false. Default is true.

    Remarks

    The visibility of the primary horizontal axis is updated when the chart is refreshed.

    ShowPrimaryMajorHorizontalGridlines

    Gets or sets whether primary major horizontal gridlines are visible.

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

    true to display primary major horizontal gridlines; otherwise, false. Default is true.

    Remarks

    Controls the visibility of major gridlines along the primary horizontal axis.

    ShowPrimaryMajorVerticalGridlines

    Gets or sets whether primary major vertical gridlines are visible.

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

    true to display primary major vertical gridlines; otherwise, false.

    Remarks

    Controls the visibility of major gridlines along the primary vertical axis.

    ShowPrimaryMinorHorizontalGridlines

    Gets or sets whether primary minor horizontal gridlines are visible.

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

    true to display primary minor horizontal gridlines; otherwise, false.

    Remarks

    Controls the visibility of minor gridlines along the primary horizontal axis.

    ShowPrimaryMinorVerticalGridlines

    Gets or sets whether primary minor vertical gridlines are visible.

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

    true to display primary minor vertical gridlines; otherwise, false.

    Remarks

    Controls the visibility of minor gridlines along the primary vertical axis.

    ShowPrimaryVerticalAxis

    Gets or sets a value indicating whether the primary vertical axis is visible.

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

    true to display the primary vertical axis; otherwise, false. Default is true.

    Remarks

    The visibility of the primary vertical axis is updated when the chart is refreshed.

    Theme

    Gets or sets the theme applied to the chart.

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

    A Theme value that specifies the chart theme.

    Remarks

    A null value leaves the current theme unchanged.

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