Я использую набор инструментов xceed wpf в своем xaml
<xctk:Pie Fill="#FFF4F4F5" HorizontalAlignment="Left" Height="250" Margin="42,80,0,0" Grid.Row="3" Grid.Column="12" Stroke="Black" VerticalAlignment="Top" Width="250" />
Вот мой код CS для каждого заголовка таблицы CSV. Я пытался создать для каждого заголовка отдельную кнопку, чтобы можно было редактировать таблицу и получать из нее обновленную диаграмму.
{
public static List<Cloths> ReadFile(string filepath)
{
var lines = File.ReadAllLines(filepath);
var data = new List<Cloths>();
foreach (var line in lines.Skip(1))
{
var split = line.Split(';');
var cloths = new Cloths();
if (split.Length != 16)
{
continue;
}
cloths.Hauptartikelnr = split[0];
cloths.Artikelname = split[1];
cloths.Hersteller = split[2];
cloths.Beschreibung = split[3];
cloths.Materialangaben = split[4];
cloths.Geschlecht = split[5];
cloths.Produktart = split[6];
cloths.Aermel = split[7];
cloths.Bein = split[8];
cloths.Kragen = split[9];
cloths.Herstellung = split[10];
cloths.Taschenart = split[11];
cloths.Grammatur = split[12];
cloths.Material = split[13];
cloths.Ursprungsland = split[14];
cloths.Bildname = split[15];
data.Add(cloths);
}
return data.ToList();
}