@namespace Connected.Components
@using System.Globalization
@inherits Chart

<svg @attributes="CustomAttributes" class="chart-donut" width="@ParentWidth" height="@ParentHeight" viewBox="0 0 42 42">
    <Filters />
    <circle class="donut-ring" cx="21" cy="21" r="15.91549430918954"></circle>
    @foreach (var item in _circles.ToList())
    {
        <circle class="chart-serie mud-donut-segment" @onclick="() => SelectedIndex = item.Index"  stroke="@(ChartParent.ChartOptions.ChartPalette.GetValue(item.Index % ChartOptions.ChartPalette.Count()))"
                cx="@ToS(item.CX)"
                cy="@ToS(item.CY)"
                r="@ToS(item.Radius)"
                stroke-dasharray="@item.StrokeDashArray"
                stroke-dashoffset="@ToS(item.StrokeDashOffset)">
        </circle>
    }
    <circle class="donut-hole" cx="21" cy="21" r="13.4"></circle>

	@ChartParent?.CustomGraphics
</svg>
<Legend Data="@_legends" />
