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
If you run the code I posted you will see it has the expected behavior. Are you still seeing "Series Title"? Can you post a sample project that exhibits the behavior you are seeing?
Even the code you posted (doing copy paste) shows this:
Hmm... are you running the latest service release for the product? I know there have been some bugs that have been resolved with the legend item template propagation but I'm not sure if the fix is in a publically available service release yet. But do make sure that you are using the latest available service release.
see: https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/68280/series-title-in-legend-when-using-groupby-and-stackedcolumnseries
I have the latest version, so I will be waiting for it, thank you.
By the way and trying to show something clear to my costumer, I have introduced a tooltip.
I am trying to show the name and the value of each column and I have just achieved to show the name. While trying to bind to the KeyMemberPath it shows in the output a binding error that tells the inexistence of such property in the series. My xaml code for your example:
ig:StackedColumnSeries.ToolTip> <StackPanel Orientation="Vertical"> <StackPanel Orientation="Horizontal"> <ContentPresenter Content="{Binding Series.KeyMemberPath, Converter={StaticResource keyConverter}, ConverterParameter='_Total'}"/> </StackPanel> <Rectangle Fill="Aquamarine" Height="1" Stretch="Fill"
Margin="4"/> <StackPanel Orientation="Horizontal"> <ContentPresenter Content="{Binding Series.ValueMemberPath, Converter={StaticResource keyConverter}, ConverterParameter='_Emission'}" Width="Auto" /> </StackPanel> </StackPanel> </ig:StackedColumnSeries.ToolTip>
I believe you are hitting a bug with the initial version of 11.2. I would recommend updating to the most recent service release. And if that doesn't fix the issue, then it should be in the next available service release, which should be quite soon.
It seems that it does not take the data template, because it doesn't debug the converter and even if I put a simple textblock instead of the content panel it continues showing the same in the legend
The version of my xamDataChart for silverlight 5 is 11.2.20112.45.
Thank you