productionSeries = new StackedAreaSeries();
.
.
.
foreach (IEnergyConverter conv in model.GetProducer())
{
SeriesDefinition ser = new SeriesDefinition //creating a new seriesdefinition
{
Title = conv.Name,
IndependentValuePath = "X_Value",
DependentValuePath = "Y_Value"
};
productionSeries.SeriesDefinitions.Add(ser); //Add to the StackedAreaSeries
producerSources.Add(new ObservableCollection<Datapoint>()); //producerSources holds the Data that is updated during execution
ser.ItemsSource = producerSources.Last(); // Data Binding
}
.
.
.
View.chart.Series.Add(productionSeries);
This is what i got so far. I am adding 5 SeriesDefinitions to "productionSeries" and they are displayed fine: the first is at the bottom and the following stacked upon. My problem now is that the legend orders the items in the same way as they were added. So the first SeriesDefinitions which is at the bottom in the diagram appears in the legend at the top.. So is it reversed and looks confusing. Is there a way to reverse the legend items or to rearrange them somehow?
I havent found anything about this problem and as far as I know unfortunately there is no documentation of the WinRTXaml Toolkit.
I hope somebody can help me out here or has a tip, thanks.