diff --git a/gui/OpenFaceOffline/UI_items/MultiBarGraph.xaml.cs b/gui/OpenFaceOffline/UI_items/MultiBarGraph.xaml.cs index 9a25a6d..5e4b0c6 100644 --- a/gui/OpenFaceOffline/UI_items/MultiBarGraph.xaml.cs +++ b/gui/OpenFaceOffline/UI_items/MultiBarGraph.xaml.cs @@ -101,6 +101,7 @@ namespace OpenFaceOffline foreach (var value in data) { BarGraph newBar = new BarGraph(); + newBar.SetValue(value); graphs.Add(newBar); barGrid.ColumnDefinitions.Add(new ColumnDefinition()); Grid.SetColumn(newBar, graphs.Count); diff --git a/gui/OpenFaceOffline/UI_items/MultiBarGraphHorz.xaml.cs b/gui/OpenFaceOffline/UI_items/MultiBarGraphHorz.xaml.cs index c0bf035..0ba76fc 100644 --- a/gui/OpenFaceOffline/UI_items/MultiBarGraphHorz.xaml.cs +++ b/gui/OpenFaceOffline/UI_items/MultiBarGraphHorz.xaml.cs @@ -131,18 +131,20 @@ namespace OpenFaceOffline foreach (var label in data_labels) { BarGraphHorizontal newBar = new BarGraphHorizontal(label + " - " + mapping[label]); + newBar.SetValue(data[label]); barGrid.RowDefinitions.Add(new RowDefinition()); Grid.SetRow(newBar, graphs.Count); graphs.Add(label, newBar); barGrid.Children.Add(newBar); - } + } + } // Update the bars foreach (var value in data) { graphs[value.Key].SetValue(value.Value); - } + } } } }