alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class PivotViewDisplayOption

    Represents display options to configure the viewport rendering mode for the SfPivotView<TValue> component.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    SfBaseComponent
    SfDataBoundComponent
    PivotViewDisplayOption
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(bool)
    SfBaseComponent.GetEffectivePlatform()
    SfBaseComponent.GetMainComponentPlatform()
    SfBaseComponent.IsMainLicenseComponent()
    SfBaseComponent.LicenseContext
    SfBaseComponent.OnObservableChange(string, object, bool, NotifyCollectionChangedEventArgs)
    SfBaseComponent.ValidateLicense()
    SfDataBoundComponent.DataManager
    SfDataBoundComponent.MainParent
    SfDataBoundComponent.OnAfterRenderAsync(bool)
    SfDataBoundComponent.SetDataManager<T>(object)
    Namespace: Syncfusion.Blazor.PivotView
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class PivotViewDisplayOption : SfDataBoundComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    The PivotViewDisplayOption class controls whether the pivot component displays as a table, a chart, or both views simultaneously. This configuration determines the visual presentation and interaction mode of the pivot data.

    The following options are available:

    • View: Specifies the viewport as Pivot Table, Pivot Chart, or both.
    • Primary: Specifies the primary view (table or chart) used when both are enabled. Applicable only when View is set to Both.

    Constructors

    PivotViewDisplayOption()

    Declaration
    public PivotViewDisplayOption()

    Properties

    Primary

    Gets or sets the primary view (table or chart) to display when both views are enabled.

    Declaration
    [Parameter]
    [JsonPropertyName("primary")]
    [JsonConverter(typeof(JsonStringEnumConverter))]
    public Primary Primary { get; set; }
    Property Value
    Type Description
    Primary

    A Primary value that selects the initial view shown when both the Pivot Table and Pivot Chart are available. The default value is Table.

    Remarks

    This setting takes effect only when View is set to Both.

    If View is not Both, the component displays the view specified by View regardless of the Primary value.

    The following options are available:

    • Table — Displays the Pivot Table as the primary view.
    • Chart — Displays the Pivot Chart as the primary view.
    Examples

    The following example enables both views and sets the chart as the primary view:

    <SfPivotView TValue="ProductDetails" Width="800" Height="500">
      <PivotViewDataSourceSettings DataSource="@data">
        <!-- Configure rows, columns, values, and filters -->
      </PivotViewDataSourceSettings>
      <PivotViewDisplayOption View="View.Both" Primary="Primary.Chart" />
    </SfPivotView>

    View

    Gets or sets the display mode of the Pivot Table (PivotView), allowing it to render as a table, a chart, or both.

    Declaration
    [Parameter]
    [JsonPropertyName("view")]
    [JsonConverter(typeof(JsonStringEnumConverter))]
    public View View { get; set; }
    Property Value
    Type Description
    View

    A View value that determines how the component is rendered:

    • Table — Renders the component in a tabular view (default).
    • Chart — Renders the component in a chart (graphical) view.
    • Both — Enables both table and chart views.
    The default value is Table.
    Remarks

    By default, the Pivot Table renders in the table view (Table).

    Use Chart to present data visually, or Both to enable simultaneous tabular and graphical analysis.

    When View is set to Both, the initial view that appears is determined by the Primary property.

    Examples

    The following example configures the PivotView to render in chart view:

    <SfPivotView TValue="ProductDetails" Width="800" Height="500">
      <PivotViewDataSourceSettings DataSource="@data">
        <!-- Configure rows, columns, values, and filters -->
      </PivotViewDataSourceSettings>
      <PivotViewDisplayOption View="View.Chart" />
    </SfPivotView>

    Methods

    OnInitializedAsync()

    Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree. Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing any asynchronous operation.

    Overrides
    SfDataBoundComponent.OnInitializedAsync()

    OnParametersSetAsync()

    Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing any asynchronous operation.

    Overrides
    SfDataBoundComponent.OnParametersSetAsync()

    Implements

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