Hello,
I am working on Syncfusion 19.3.0.57, i want to create a Chart in polar type and with column drawtype. When i start my page, the list for datasource is empty and i receive an error. Is it logic or an error ?
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.Generic.List`1[[Syncfusion.Blazor.Charts.Chart.Internal.Point, Syncfusion.Blazor, Version=19.3.0.57, Culture=neutral, PublicKeyToken=null]].get_Item(Int32 index)
at Syncfusion.Blazor.Charts.Internal.PolarColumnSeriesRenderer.ColumnDrawTypeRender(ChartSeries series, ChartAxis x_Axis, ChartAxis y_Axis)
at Syncfusion.Blazor.Charts.Internal.PolarColumnSeriesRenderer.RenderSeries()
at Syncfusion.Blazor.Charts.Internal.ChartSeriesRenderer.SeriesRenderer()
at Syncfusion.Blazor.Charts.Internal.ChartSeriesRenderer.HandleChartSizeChange(Rect rect)
at Syncfusion.Blazor.Charts.Internal.ChartSeriesRendererContainer.HandleChartSizeChange(Rect rect)
at Syncfusion.Blazor.Charts.SfChart.PerformLayout()
at Syncfusion.Blazor.Charts.SfChart.OnAfterRenderAsync(Boolean firstRender)
<SfChart @ref="@Chart" Theme="@(_ThemeState.Value.Theme)" CustomClass="chart-in-panel">
<ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Category" />
<ChartPrimaryYAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Double" Minimum="0" Maximum="@max" />
<ChartTooltipSettings Enable="true"></ChartTooltipSettings>
<ChartSeriesCollection>
<ChartSeries DataSource="@visitesSites" XName="Nom" YName="@type" Type="ChartSeriesType.Polar" DrawType="ChartDrawType.Column" Fill="#04AB11" PointColorMapping="Color">
</ChartSeries>
</ChartSeriesCollection>
</SfChart>
@code {
private List<Cat> visitesSites = new();
class Cat
{
public int IdxCategorie { get; set; }
public string Nom { get; set; }
public int Count { get; set; }
public double TempsMoyen { get; set; }
public double TempsTotal { get; set; }
public string Color { get; set; }
}
I did test and see error appear when i set the Type to ChartSeriesType.Polar.
I think there could be an error here.