Class AccumulationChartSeries
Series represents the collection of data in the Accumulation chart. Gets and set the Series of the Accumulation series.
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class AccumulationChartSeries : SfDataBoundComponent
Constructors
AccumulationChartSeries()
Declaration
public AccumulationChartSeries()
Properties
Animation
Gets or sets the options for customizing the animation of the series in the SfAccumulationChart.
Declaration
public AccumulationChartAnimation Animation { get; set; }
Property Value
Type | Description |
---|---|
AccumulationChartAnimation | Accepts an instance of the AccumulationChartAnimation class. The default value is a new instance of the AccumulationChartAnimation class. |
Remarks
Use this property to define the animation settings for the series appearing in the SfAccumulationChart.
Examples
// The following code snippet shows how to disable the animation in the accumulation chart:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
<AccumulationChartAnimation Delay="2000" Duration="2000" Enable="false></AccumulationChartAnimation>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Border
Gets or sets the options for customizing the border of the series in the SfAccumulationChart.
Declaration
public AccumulationChartSeriesBorder Border { get; set; }
Property Value
Type | Description |
---|---|
AccumulationChartSeriesBorder | Accepts an instance of the AccumulationChartSeriesBorder class. The default value is a new instance of the AccumulationChartSeriesBorder class. |
Remarks
Use this property to customize the series border in the SfAccumulationChart.
Examples
// In the following example, the series border color is set to red:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
<AccumulationChartSeriesBorder Color="red" Width="2"></AccumulationChartSeriesBorder>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
BorderRadius
Gets or sets the border radius of the accumulation chart series.
Declaration
public double BorderRadius { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value that defines the border radius. The default value is |
Remarks
Applies a border radius to accumulation chart series types such as Pie, Donut, Funnel, and Pyramid. This creates rounded corners on the series to enhance visual appearance and support customization.
Examples
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries BorderRadius= "8" >
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
DataLabel
Gets or sets the data label settings for the series in the SfAccumulationChart.
Declaration
public AccumulationDataLabelSettings DataLabel { get; set; }
Property Value
Type | Description |
---|---|
AccumulationDataLabelSettings | Accepts an instance of the AccumulationDataLabelSettings class. The default value is a new instance of the AccumulationDataLabelSettings class. |
Remarks
Use this property to customize the data labels for the series in the SfAccumulationChart.
Examples
// The following example demonstrates enabling data labels in the chart:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
<AccumulationDataLabelSettings Visible="true" Position="AccumulationLabelPosition.Outside" Format="C"></AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
DataSource
Gets or sets the data source for the SfAccumulationChart series.
Declaration
public IEnumerable<object> DataSource { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> | Accepts an IEnumerable object as a data source. It can be a JSON array or an instance of DataManager. The default value is null. |
Remarks
The DataSource property allows binding data to the SfAccumulationChart. You can use an IEnumerable object, such as a list of objects or an array of JSON objects. To consume data from a remote service, you can use a SfDataManager instance.
Examples
// The following code snippets demonstrate how to bind a data source to the <see cref="SfAccumulationChart">Accumulation Chart</see> and map the YName to "Users":
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
@code {
public class Statistics
{
public string Browser { get; set; }
public double? Users { get; set; }
}
public List<Statistics> StatisticsDetails = new List<Statistics>
{
new Statistics { Browser = "Chrome", Users = 37 },
new Statistics { Browser = "UC Browser", Users = 17 },
new Statistics { Browser = "iPhone", Users = 19 },
new Statistics { Browser = "Others", Users = 27 }
};
}
EmptyPointSettings
Gets or sets the options to customize the empty points in the series of the SfAccumulationChart.
Declaration
public AccumulationChartEmptyPointSettings EmptyPointSettings { get; set; }
Property Value
Type | Description |
---|---|
AccumulationChartEmptyPointSettings | Accepts an instance of the AccumulationChartEmptyPointSettings class. The default value is a new instance of the AccumulationChartEmptyPointSettings class. |
Remarks
Use this property to customize how empty points are rendered in the series of the SfAccumulationChart.
Examples
// The following example demonstrates how to set the empty point mode to <c>Average</c>:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
<AccumulationChartEmptyPointSettings Mode="EmptyPointMode.Average"></AccumulationChartEmptyPointSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
@code {
public class Statistics
{
public string Browser { get; set; }
public double? Users { get; set; }
public string Text { get; set; }
}
public List<Statistics> StatisticsDetails = new List<Statistics> {
new Statistics { Browser = "Chrome", Users = 37 },
new Statistics { Browser = "UC Browser", Users = null },
new Statistics { Browser = "iPhone", Users = 19 },
new Statistics { Browser = "Others", Users = 27 }
};
}
EnableTooltip
Gets or sets a value indicating whether the tooltip is enabled for the series in the SfAccumulationChart.
Declaration
public bool EnableTooltip { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value that specifies if the tooltip is enabled. The default value is true. |
Remarks
Use this property to control the display of tooltips for the series in the SfAccumulationChart. If EnableTooltip is set to false, the series tooltip will be disabled even if Enable is set to true.
Examples
// The following code snippet demonstrates how to disable the tooltip for a specific series while still allowing tooltips for the chart overall.
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" EnableTooltip="false">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<AccumulationChartTooltipSettings Enable="true"></AccumulationChartTooltipSettings>
</SfAccumulationChart>
EndAngle
Gets or sets the end angle of the series in the SfAccumulationChart.
Declaration
public double EndAngle { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value representing the end angle in degrees. The default value is |
Remarks
Use this property to control where the series will end in the chart. Setting EndAngle can be useful for drawing semi-circular or quarter-circular charts.
Examples
// The following example demonstrates how to set the EndAngle to a custom value:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" EndAngle="270">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Explode
Determines if the series points will be exploded on mouse click or touch.
Declaration
public bool Explode { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value that specifies whether series points can be exploded. The default value is |
Remarks
If set to true, clicking on a series point will explode the point away from the pie chart center, highlighting the selected series.
Examples
// The following example demonstrates enabling the explode functionality:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" Explode="true">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
ExplodeAll
Determines if all points in the series will be exploded on load.
Declaration
public bool ExplodeAll { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether to explode all series points on load. The default value is |
Remarks
This property will explode all series points as soon as the chart is loaded.
Examples
// The following example demonstrates all series points exploded on load:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" ExplodeAll="true">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
ExplodeIndex
Specifies the index of the point to be exploded on load.
Declaration
public double ExplodeIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value indicating the index of the series point to explode. The default value is |
Remarks
Setting this property will explode the specified series point immediately when the chart is rendered.
Examples
// The following example demonstrates exploding a specific point on load by its index:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" ExplodeIndex="2">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
ExplodeOffset
Defines the distance of the exploded point from the center, which can be expressed in pixels or percentage.
Declaration
public string ExplodeOffset { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string value indicating the distance, such as "30%" or "50px". The default value is |
Remarks
This property sets how far a series point explodes from the chart's center.
Examples
// The following example demonstrates how to set a custom explode offset for series points:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" ExplodeOffset="40%">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
GapRatio
Gets or sets the distance ratio between segments of a funnel or pyramid series in the SfAccumulationChart.
Declaration
public double GapRatio { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the gap ratio, where 0 indicates no gap and 1 indicates the maximum gap possible. |
Remarks
Use this property to adjust the spacing between the segments of funnel or pyramid charts.
Examples
// The following example demonstrates setting the gap ratio between segments:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" Type="AccumulationType.Pyramid" GapRatio="0.3">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
GroupMode
Gets or sets the grouping mode for the SfAccumulationChart component.
Declaration
public GroupMode GroupMode { get; set; }
Property Value
Type | Description |
---|---|
GroupMode | One of the GroupMode enumerations that specifies how the series points are grouped. Options include:
|
Remarks
The GroupMode property defines how smaller data points are combined in the accumulation chart. Choose one of the available values from the GroupMode enumeration to control the appearance and behavior of grouped points. By default, it is set to Value, which groups based on a threshold.
Examples
// The following example demonstrates setting the GroupMode to "Point" in an accumulation chart:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" GroupMode="GroupMode.Point">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
GroupTo
Gets or sets the threshold value for grouping certain points into a single "Others" slice in the SfAccumulationChart.
Declaration
public string GroupTo { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the threshold value. Points with a value less than this threshold are grouped together and displayed as a single "Others" slice. The value can also be set as a percentage of the total data points' value. |
Remarks
The GroupTo property is used to combine points whose values are below the specified threshold into one collective "Others" point.
Examples
// The following example demonstrates setting GroupTo to "4" to group smaller points in an accumulation chart into an "Others" category:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" GroupTo="4">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
@code {
public class Statistics
{
public string Browser { get; set; }
public double? Users { get; set; }
public string Text { get; set; }
}
public List<Statistics> StatisticsDetails = new List<Statistics>
{
new Statistics { Browser = "Chrome", Users = 37 },
new Statistics { Browser = "UC Browser", Users = 17 },
new Statistics { Browser = "iPhone", Users = 19 },
new Statistics { Browser = "Edge", Users = 4 },
new Statistics { Browser = "Opera", Users = 11 },
new Statistics { Browser = "Android", Users = 12 },
};
}
Height
Gets or sets the height of the funnel or pyramid series relative to the chart area in the SfAccumulationChart.
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the height, expressed as a percentage of the chart area's height. The default value is |
Remarks
By adjusting the height, you can ensure that the funnel or pyramid series fits well within the chart area.
Examples
// The following example demonstrates setting the height of the funnel series:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" Type="AccumulationType.Funnel" Height="60%">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
InnerRadius
Gets or sets the inner radius of the pie series in the SfAccumulationChart, specified as a percentage of the radius.
Declaration
public string InnerRadius { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the inner radius as a percentage, where a value like "50%" specifies that the pie series should have a hole in the center occupying 50% of the series' radius.
The default value is |
Remarks
The InnerRadius property allows you to create donut charts by specifying the size of the hole at the center of the pie series. If not set, the pie series will render without an inner circle, resulting in a traditional pie chart.
Examples
// The following example demonstrates setting the InnerRadius to 40% to create a donut chart:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" InnerRadius="40%">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
LegendShape
Defines the shapes available for legends in charts.
Declaration
public LegendShape LegendShape { get; set; }
Property Value
Type | Description |
---|---|
LegendShape | Specifies the legend shape for each series. The available shapes include:
|
Remarks
The LegendShape enumeration allows you to select a specific shape for legend items in a chart. By default, it adapts to the shape being used in the series type.
Examples
// The following example demonstrates setting the LegendShape to "Circle" for a chart series:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@ChartData" XName="Category" YName="Value" LegendShape="LegendShape.Circle">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Name
Gets or sets the name of the series in the SfAccumulationChart component.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a string value representing the name of the series. The default value is an empty string. |
Remarks
The Name property is used to specify the name of the series, which is displayed as legend text in the chart. If not explicitly set, the default value is an empty string.
Examples
// This example sets the Name property for a series in an accumulation chart:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" Name="Sales">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
NeckHeight
Defines the height of the funnel neck with respect to the chart area.
Declaration
public string NeckHeight { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the neck height as a percentage of the chart area. The default value is |
Remarks
Modifying the neck height alters the tapering effect in funnel charts.
Examples
// Example showing a funnel series with a custom neck height:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" Type="AccumulationType.Funnel" NeckHeight="30%">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
NeckWidth
Defines the width of the funnel neck with respect to the chart area.
Declaration
public string NeckWidth { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the neck width as a percentage of the chart area.mThe default value is |
Remarks
Adjusting the neck width in funnel charts changes the narrowest part of the funnel.
Examples
// Example of setting a custom neck width for a funnel series:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" Type="AccumulationType.Funnel" NeckWidth="35%">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Opacity
Determines the opacity of the series on the chart.
Declaration
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value indicating the opacity, ranging from 0 to 1. The default value is 1, indicating full opacity. |
Remarks
Adjusting the opacity can be useful for layering multiple series.
Examples
// This example sets the opacity of a series to 0.5 for semi-transparency:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" Opacity="0.5">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>b
Palettes
Gets or sets the palette of colors used for the series points in the chart.
Declaration
public string[] Palettes { get; set; }
Property Value
Type | Description |
---|---|
System.String[] | An array of strings where each string represents a color in hexadecimal format (e.g., "#FF5733") or a named color (e.g., "Red"). The default value is an empty array, which lets the chart use a default color set. |
Remarks
The Palettes property allows customization of the series point colors in a chart. By setting this property, you can define specific colors that apply to each point.
Examples
// The following example setting a custom color palette for a chart series:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" Palettes="@Palettes">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
@code {
public string[] Palettes { get; set; } = new string[] { "#FF5733", "#33FF57", "#3357FF" };
}
PointColorMapping
Gets or sets the data source field that contains the color value for each point in the series.
Declaration
public string PointColorMapping { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the data source field name used to map the fill color for each chart point. The default value is an empty string. |
Remarks
The PointColorMapping property allows you to map individual point colors from a specific field in your data source. Ensure the data source includes a field with valid color values (e.g., hexadecimal color strings) for proper mapping.
Examples
<SfAccumulationChart Title="Mobile Browser Statistics">
<AccumulationChartLegendSettings Visible="true"></AccumulationChartLegendSettings>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" PointColorMapping="Fill">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
@code {
public class Statistics
{
public string Browser { get; set; }
public double Users { get; set; }
public string Fill { get; set; }
}
public List<Statistics> StatisticsDetails = new List<Statistics>
{
new Statistics { Browser = "Chrome", Users = 37, Fill="#498fff" },
new Statistics { Browser = "UC Browser", Users = 17, Fill="#ffa060" },
new Statistics { Browser = "iPhone", Users = 19, Fill="#ff68b6" },
new Statistics { Browser = "Others", Users = 4, Fill="#81e2a1" },
new Statistics { Browser = "Opera", Users = 11, Fill="#ffb980" },
new Statistics { Browser = "Android", Users = 12, Fill="#09e1e8" },
};
}
PyramidMode
Gets or sets the mode for the pyramid series in the SfAccumulationChart.
Declaration
public PyramidMode PyramidMode { get; set; }
Property Value
Type | Description |
---|---|
PyramidMode | One of the PyramidMode enumerations that specifies how the pyramid segments represent values:
|
Remarks
The PyramidMode property defines how pyramid chart data is visualized, influencing the appearance of segment proportions. Choose one of the options from the PyramidMode enumeration to adjust the representation. By default, it is set to Linear, which uses segment height for display purposes.
Examples
// The following example demonstrates setting the PyramidMode to "Surface" in a pyramid chart:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource = "@StatisticsDetails" XName="Browser" YName="Users" Type="AccumulationType.Pyramid" PyramidMode="PyramidMode.Surface">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Query
Gets or sets the query for the SfAccumulationChart to filter the data source.
Declaration
public Query Query { get; set; }
Property Value
Type | Description |
---|---|
Query | Accepts a Query object to filter the data source. The default value is a new instance of Query. |
Remarks
This property is applicable only when the DataSource is of type SfDataManager.
Radius
Gets or sets the radius of the pie series in the SfAccumulationChart, specified as a percentage of the chart area.
Declaration
public string Radius { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the radius as a percentage. The default value is 80%. |
Remarks
The Radius property allows you to adjust the size of the pie series within the chart area. If not specified, the pie series will default to occupying 80% of the available space.
Examples
// The following example demonstrates setting the Radius to 100%:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" Radius="100%">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
SelectionStyle
Custom style for the selected series or points.
Declaration
public string SelectionStyle { get; set; }
Property Value
Type |
---|
System.String |
StartAngle
Gets or sets the start angle for rendering a series in the SfAccumulationChart.
Declaration
public double StartAngle { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double that represents the starting angle in degrees from which the series will begin rendering in the chart. The angle is specified in degrees and typically ranges from -360 to 360. |
Remarks
The StartAngle property specifies the angle at which the series starts to draw in the chart. If not explicitly set, the series starts rendering at the default angle, usually 0 degrees.
Examples
// The following example demonstrates how to set the StartAngle to 90 degrees for a different starting orientation:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" StartAngle="90">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
TooltipMappingName
Gets or sets the field name used for mapping tooltip content in the SfAccumulationChart.
Declaration
public string TooltipMappingName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string specifying the field name in the data source to map for tooltip content. The default value is an empty string. |
Remarks
To utilize the TooltipMappingName, ensure that the Enable property is set to true,
and that the format includes the $point.tooltip
placeholder. This configuration allows additional information from the data source to be displayed in the tooltip.
Examples
// The following example demonstrates how to enable tooltip with additional mapped content:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" TooltipMappingName="Text">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
<AccumulationChartTooltipSettings Enable="true" Format="${point.tooltip}"></AccumulationChartTooltipSettings>
</SfAccumulationChart>
@code {
public class Statistics
{
public string Browser { get; set; }
public double? Users { get; set; }
public string Text { get; set; }
}
public List<Statistics> StatisticsDetails = new List<Statistics>
{
new Statistics { Browser = "Chrome", Users = 37, Text = "Chrome: 37%" },
new Statistics { Browser = "UC Browser", Users = 17, Text = "UC Browser: 17%" },
new Statistics { Browser = "iPhone", Users = 19, Text = "iPhone: 19%" },
new Statistics { Browser = "Others", Users = 4, Text = "Others: 4%" }
};
}
Type
Gets or sets the series type for the SfAccumulationChart component.
Declaration
public AccumulationType Type { get; set; }
Property Value
Type | Description |
---|---|
AccumulationType | One of the AccumulationType enumerations that specifies the type of the series. Options include:
|
Remarks
The Type property specifies the type of series to be displayed in the accumulation chart. Choose one of the available values from the AccumulationType enumeration to define the appearance and behavior of the series. If not explicitly set, the default value is Pie, representing a pie chart series.
Examples
// The following example demonstrates how to set the Type to "Funnel" in an accumulation chart:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" Type="AccumulationType.Funnel">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Visible
Gets or sets the visibility of the series for the SfAccumulationChart.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Accepts a boolean value. The default value is |
Remarks
The Visible property determines whether the series is displayed or hidden in the chart.
By setting this property to true
, the series will be visible, whereas setting it to false
will hide the series.
Examples
// The following example demonstrates how to set the series visibility to false:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" Visible="false">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Width
Gets or sets the width of the funnel, pyramid, or pie series with respect to the chart area in the SfAccumulationChart.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that represents the width as a percentage of the chart area. The default value is |
Remarks
Adjust the Width property to control the horizontal size of the funnel, pyramid, or pie series within the chart area. This value should typically be specified as a percentage.
Examples
// The following example demonstrates how to set the width of a pie series to 50% of the chart area:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" Width="50%">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
XName
Gets or sets the field name that contains the x value for the chart series in the SfAccumulationChart.
Declaration
public string XName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that represents the field name in the data source. The default value is an empty string. |
Remarks
The XName property is used to specify the field name from the data source that contains the x values for the chart series. By correctly assigning the field name, you ensure proper mapping of x values to the respective data points in the chart. If not explicitly set, the default value is an empty string.
Examples
// The following example demonstrates how to set the XName to "Browser" to map x values from the data source:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
@code {
public class Statistics
{
public string Browser { get; set; }
public double? Users { get; set; }
}
public List<Statistics> StatisticsDetails = new List<Statistics>
{
new Statistics { Browser = "Chrome", Users = 37 },
new Statistics { Browser = "UC Browser", Users = 17 },
new Statistics { Browser = "iPhone", Users = 19 },
new Statistics { Browser = "Others", Users = 27 }
};
}
YName
Gets or sets the field name that contains the y value for the chart series in the SfAccumulationChart.
Declaration
public string YName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that represents the field name in the data source. The default value is an empty string. |
Remarks
The YName property specifies the field name in the data source that contains the y values for the chart series. Assign the name of the corresponding field in the data source to this property to map the y values correctly. If not explicitly set, the default value is an empty string.
Examples
// The following example demonstrates how to set the YName to "Users" to map y values from the data source:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
@code {
public class Statistics
{
public string Browser { get; set; }
public double? Users { get; set; }
}
public List<Statistics> StatisticsDetails = new List<Statistics>
{
new Statistics { Browser = "Chrome", Users = 37 },
new Statistics { Browser = "UC Browser", Users = 17 },
new Statistics { Browser = "iPhone", Users = 19 },
new Statistics { Browser = "Others", Users = 27 }
};
}
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |