This is an excerpt of the case:
// Each item has the "Total" as TimeSpan Property
foreach (var item in kronosData.Processes)
{
var s = kronosData.Stats.Where(x => x.Process == item);
plotChart.Series.Add(new OxyPlot.Wpf.BarSeries()
{
IsStacked = true,
Title = item.Name,
ItemsSource = s,
ValueField = "Total",
});
}
plotChart.InvalidatePlot();
<oxy:Plot x:Name="plotChart" Grid.Row="1" Title="Tiempo Total" LegendPlacement="Outside" LegendPosition="BottomCenter" LegendOrientation="Horizontal">
<oxy:Plot.Axes>
<oxy:CategoryAxis LabelField="Items" Position="Left" />
<oxy:TimeSpanAxis Position="Bottom" />
</oxy:Plot.Axes>
<oxy:Plot.Series>
</oxy:Plot.Series>
</oxy:Plot>
// Each item has the "Total" as TimeSpan Property
foreach (var item in kronosData.Processes)
{
var s = kronosData.Stats.Where(x => x.Process == item);
plotChart.Series.Add(new OxyPlot.Wpf.BarSeries()
{
IsStacked = true,
Title = item.Name,
ItemsSource = s,
ValueField = "Total",
});
}
plotChart.InvalidatePlot();
<oxy:Plot x:Name="plotChart" Grid.Row="1" Title="Tiempo Total" LegendPlacement="Outside" LegendPosition="BottomCenter" LegendOrientation="Horizontal">
<oxy:Plot.Axes>
<oxy:CategoryAxis LabelField="Items" Position="Left" />
<oxy:TimeSpanAxis Position="Bottom" />
</oxy:Plot.Axes>
<oxy:Plot.Series>
</oxy:Plot.Series>
</oxy:Plot>