Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenChart

    Displays line, area, donut, pie, bar or column series.

    Inheritance
    System.Object
    RadzenComponent
    RadzenChart
    RadzenSparkline
    Implements
    IDisposable
    Inherited Members
    RadzenComponent.Attributes
    RadzenComponent.Element
    RadzenComponent.MouseEnter
    RadzenComponent.MouseLeave
    RadzenComponent.ContextMenu
    RadzenComponent.Culture
    RadzenComponent.DefaultCulture
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.OnContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.Style
    RadzenComponent.Visible
    RadzenComponent.GetCssClass()
    RadzenComponent.GetId()
    RadzenComponent.Debounce(Func<Task>, Int32)
    RadzenComponent.UniqueID
    RadzenComponent.JSRuntime
    RadzenComponent.IsJSRuntimeAvailable
    RadzenComponent.Reference
    RadzenComponent.RaiseContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.RaiseMouseLeave()
    RadzenComponent.CurrentStyle
    Namespace: Radzen.Blazor
    Assembly: Radzen.Blazor.dll
    Syntax
    public class RadzenChart : RadzenComponent, IDisposable
    Examples
      <RadzenChart>
          <RadzenColumnSeries Data=@revenue CategoryProperty="Quarter" ValueProperty="Revenue" />
      </RadzenChart>
      @code {
          class DataItem
          {
              public string Quarter { get; set; }
              public double Revenue { get; set; }
          }
          DataItem[] revenue = new DataItem[]
          {
              new DataItem { Quarter = "Q1", Revenue = 234000 },
              new DataItem { Quarter = "Q2", Revenue = 284000 },
              new DataItem { Quarter = "Q3", Revenue = 274000 },
              new DataItem { Quarter = "Q4", Revenue = 294000 }
          };
      }

    Properties

    ChildContent

    Gets or sets the child content. Used to specify series and other configuration.

    Declaration
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    RenderFragment

    The child content.

    ClickTolerance

    The minimum pixel distance from a data point to the mouse cursor required for the SeriesClick event to fire. Set to 25 by default.

    Declaration
    public int ClickTolerance { get; set; }
    Property Value
    Type Description
    System.Int32

    ColorScheme

    Gets or sets the color scheme used to render the series.

    Declaration
    public ColorScheme ColorScheme { get; set; }
    Property Value
    Type Description
    ColorScheme

    The color scheme.

    Height

    Gets the runtime height of the chart.

    Declaration
    protected double? Height { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    LegendClick

    A callback that will be invoked when the user clicks on a legend.

    Declaration
    public EventCallback<LegendClickEventArgs> LegendClick { get; set; }
    Property Value
    Type Description
    EventCallback<LegendClickEventArgs>

    MarginBottom

    Gets or sets the bottom margin of the plot area.

    Declaration
    protected double MarginBottom { get; set; }
    Property Value
    Type Description
    System.Double

    MarginLeft

    Gets or sets the left margin of the plot area.

    Declaration
    protected double MarginLeft { get; set; }
    Property Value
    Type Description
    System.Double

    MarginRight

    Gets or sets the right margin of the plot area.

    Declaration
    protected double MarginRight { get; set; }
    Property Value
    Type Description
    System.Double

    MarginTop

    Gets or sets the top margin of the plot area.

    Declaration
    protected double MarginTop { get; set; }
    Property Value
    Type Description
    System.Double

    SeriesClick

    A callback that will be invoked when the user clicks on a series.

    Declaration
    public EventCallback<SeriesClickEventArgs> SeriesClick { get; set; }
    Property Value
    Type Description
    EventCallback<SeriesClickEventArgs>

    TooltipTolerance

    The minimum pixel distance from a data point to the mouse cursor required by the tooltip to show. Set to 25 by default.

    Declaration
    public int TooltipTolerance { get; set; }
    Property Value
    Type Description
    System.Int32

    Width

    Gets the runtime width of the chart.

    Declaration
    protected double? Width { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    Methods

    Click(Double, Double)

    Invoked via interop when the user clicks the RadzenChart. Raises the SeriesClick handler.

    Declaration
    public async Task Click(double x, double y)
    Parameters
    Type Name Description
    System.Double x

    The x.

    System.Double y

    The y.

    Returns
    Type Description
    Task

    DisplayTooltipFor(IChartSeries, Object)

    Displays a Tooltip on a chart without user interaction, given a series, and the data associated with it.

    Declaration
    public async Task DisplayTooltipFor(IChartSeries series, object data)
    Parameters
    Type Name Description
    IChartSeries series
    System.Object data
    Returns
    Type Description
    Task

    Dispose()

    Detaches event handlers and disposes Reference.

    Declaration
    public override void Dispose()
    Overrides
    RadzenComponent.Dispose()

    GetComponentCssClass()

    Gets the component CSS class.

    Declaration
    protected override string GetComponentCssClass()
    Returns
    Type Description
    System.String
    Overrides
    RadzenComponent.GetComponentCssClass()

    GetSeries()

    Returns the Series used by the Chart.

    Declaration
    public IReadOnlyList<IChartSeries> GetSeries()
    Returns
    Type Description
    IReadOnlyList<IChartSeries>

    MouseMove(Double, Double)

    Invoked via interop when the user moves the mouse over the RadzenChart. Displays the tooltip.

    Declaration
    public async Task MouseMove(double x, double y)
    Parameters
    Type Name Description
    System.Double x

    The x.

    System.Double y

    The y.

    Returns
    Type Description
    Task

    OnAfterRenderAsync(Boolean)

    Called by the Blazor runtime.

    Declaration
    protected override async Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    System.Boolean firstRender
    Returns
    Type Description
    Task
    Overrides
    RadzenComponent.OnAfterRenderAsync(Boolean)

    OnInitialized()

    Called by the Blazor runtime.

    Declaration
    protected override void OnInitialized()
    Overrides
    RadzenComponent.OnInitialized()

    Reload()

    Causes all series to refresh. Use it when Data has changed.

    Declaration
    public async Task Reload()
    Returns
    Type Description
    Task

    Resize(Double, Double)

    Invoked via interop when the RadzenChart resizes. Display the series with the new dimensions.

    Declaration
    public async Task Resize(double width, double height)
    Parameters
    Type Name Description
    System.Double width

    The width.

    System.Double height

    The height.

    Returns
    Type Description
    Task

    SetParametersAsync(ParameterView)

    Called by the Blazor runtime when parameters are set.

    Declaration
    public override async Task SetParametersAsync(ParameterView parameters)
    Parameters
    Type Name Description
    ParameterView parameters

    The parameters.

    Returns
    Type Description
    Task
    Overrides
    RadzenComponent.SetParametersAsync(ParameterView)

    ShouldRenderAxes()

    Returns whether the chart should render axes.

    Declaration
    protected bool ShouldRenderAxes()
    Returns
    Type Description
    System.Boolean

    UpdateScales()

    Updates the scales based on the configuration.

    Declaration
    protected virtual bool UpdateScales()
    Returns
    Type Description
    System.Boolean

    Implements

    IDisposable

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT