alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class AccumulationChartLegendInfo

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

    Properties

    Data

    Gets or sets the data from DataSource bound to the current legend item template.

    Declaration
    public Dictionary<string, object> Data { get; set; }
    Property Value
    Type Description
    Dictionary<string, object>

    A Dictionary<TKey, TValue> of string and object that represents the current legend item data.

    Remarks

    This property is used to retrieve the current legend item data when LegendItemTemplate is used in the SfAccumulationChart. If you need to display custom content such as images or user-defined text that is not directly bound to the chart, you can include those fields in the DataSource and access them within the LegendItemTemplate.

    Examples
    <SfAccumulationChart> 
        <AccumulationChartSeriesCollection> 
            <AccumulationChartSeries> 
                <LegendItemTemplate> 
                    @{ var data = context as AccumulationChartLegendIInfo; } 
                    <div> 
                        <div style="border-radius:5px;background:green;width:10px;height:10px"></div> 
                        <div>Profit: @data.Data["Image"]</div> 
                    </div> 
                </LegendItemTemplate> 
            </AccumulationChartSeries> 
        </AccumulationChartSeriesCollection> 
        <AccumulationChartLegendSettings Visible="true" ShowShapes="false" /> 
    </SfAccumulationChart>

    Text

    Gets or sets the text to be rendered in the corresponding legend item template.

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

    A string value that represents the current legend item text. The default value is taken from the field specified in the XName property.

    Remarks

    This property is used to retrieve the current legend item text when a LegendItemTemplate is used in the SfAccumulationChart.

    Examples
    <SfAccumulationChart> 
        <AccumulationChartSeriesCollection> 
            <AccumulationChartSeries> 
                <LegendItemTemplate> 
                    @{ var data = context as AccumulationChartLegendIInfo; } 
                    <div> 
                        <div style="border-radius:5px;background:green;width:10px;height:10px"></div> 
                        <div>Profit: @data.Text</div> 
                    </div> 
                </LegendItemTemplate> 
            </AccumulationChartSeries> 
        </AccumulationChartSeriesCollection> 
        <AccumulationChartLegendSettings Visible="true" ShowShapes="false" /> 
    </SfAccumulationChart>
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved