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

<svg @attributes="CustomAttributes" class="chart-pie" width="@ChartParent?.Width" height="@ChartParent?.Height" viewBox="-1 -1 2 2" style="transform: rotate(-90deg);">
    <Filters />
    @foreach (var item in _paths.ToList())
    {
		<path @onclick="() => SelectedIndex = item.Index" class="chart-serie" fill="@(ChartParent.ChartOptions.ChartPalette.GetValue(item.Index % ChartOptions.ChartPalette.Count()))" d="@item.Data"></path>
	}

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