Hello,
I am trying to show a StackedColumnSeries which will have in each column the same X number of data to be stacked.
What I want to do is to create dynamically each StackedFragmentSeries depending on the number of the data to be shown. I can't know the quantity because there will be different filters which will allow to pick different information from the database.
In the example below is my attempt to show it by binding the stackedFragmentSeries to an ObservableCollection, but it doesn't show anything. Emissions is the Observable collection with the values catched from the Database and they are Decimals. Any help about this?
<ig:XamDataChart x:Name="xamStackedColumnChart" Legend="{Binding ElementName=xmLegend}" Padding="10" Visibility="Visible" HorizontalZoomable="True" HorizontalZoombarVisibility="Collapsed" VerticalZoomable="True" VerticalZoombarVisibility="Collapsed" > <ig:XamDataChart.Axes> <ig:NumericYAxis x:Name="StackedColumnYAxis" MinimumValue="0" Interval="10000" Label="{}{} T CO2" MaximumValue="250000" LabelSettings="{StaticResource AxisLabelSettings2}"/> <ig:CategoryXAxis x:Name="StackedColumnXAxis" ItemsSource="{Binding ValuesOfExcessVSEmissions}" Label="{}{Date}" /> </ig:XamDataChart.Axes> <ig:XamDataChart.Series> <ig:StackedColumnSeries x:Name="StackedColumns" XAxis="{Binding ElementName=StackedColumnXAxis}" YAxis="{Binding ElementName=StackedColumnYAxis}" ItemsSource="{Binding ValuesOfExcessVSEmissions}"> <ig:StackedColumnSeries.Series> <ig:StackedFragmentSeries ValueMemberPath="Emissions" Title="{Binding ValuesOfExcessVSEmissions}"> </ig:StackedFragmentSeries> </ig:StackedColumnSeries.Series> </ig:StackedColumnSeries> </ig:XamDataChart.Series> </ig:XamDataChart>
Hi, could you show an example of you data? Depending on the format of the data, you should be able to use our GroupBy data source and AutoGenerateSeries on the StackedColumnSeries.
-Graham
What do you need exactly?
Did you properly merge in all the changes from the sample I posted? It sounds like you are not setting the LegendItemTemplate
no luck
Is GroupBy still available for WPF in version 15.1?
What is the namespace for "igChart"?
Snippet:
Thanks,
Michael
Got it now that I am awake. :-)
<Window x:Class="WpfAppStackedColumnSerie.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfAppStackedColumnSerie" xmlns:igChart="clr-namespace:Infragistics.Controls.Charts;assembly=InfragisticsWPF4.Controls.Charts.XamDataChart.v14.2" xmlns:ig="http://schemas.infragistics.com/xaml" Title="MainWindow" Height="350" Width="525"> <Window.Resources> <local:TestEmissionsCollection x:Key="data" /> <ig:GroupBy x:Key="grouped" ItemsSource="{StaticResource data}" GroupMemberPath="Date" KeyMemberPath="Installation" ValueMemberPath="Emission" /> </Window.Resources> <Grid>
Using the Sample above how do we properly format the Tooltip value?
Currently it is only displaying the value not the name.
Current Tooltip reads: Series Title: 7
Ideally we want: Emission: 7.
Hello Michael,
I believe Rob has already answered this question here:
https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/97084/xamdatachart-stackedcolumnseries-group-by-how-do-we-properly-set-the-tooltip-and-legend