Hello,
I try to implement a XamDataChart with Stacked100ColumnSeries but it seems these components cannot be databind to a collection in the viewmodel !? No problem with a StaticResource but nothing is displayed with a binding to the viewmodel...
Here is the xaml:
<
ig:XamDataChart Margin="0,10,20,0" HorizontalZoomable="True" HorizontalZoombarVisibility="Visible"Legend="{Binding ElementName=scadaStatusStatisticLegend}" ><ig:XamDataChart.Axes><ig:CategoryXAxis x:Name="scadaStatusStatisticXAxis"ItemsSource="{Binding ScadaStatusStatisticDataList}"Label="{}{GroupName}"Strip="Transparent"MajorStroke="Transparent" ><ig:CategoryXAxis.LabelSettings ><ig:AxisLabelSettings Location="OutsideLeft"Extent="30" /></ig:CategoryXAxis.LabelSettings></ig:CategoryXAxis><ig:NumericYAxis x:Name="scadaStatusStatisticYAxis"MinimumValue="0"><ig:NumericYAxis.LabelSettings><ig:AxisLabelSettings Location="OutsideLeft"Extent="50" /></ig:NumericYAxis.LabelSettings></ig:NumericYAxis></ig:XamDataChart.Axes><ig:XamDataChart.Series><ig:Stacked100ColumnSeries ItemsSource="{Binding ScadaStatusStatisticDataList}"XAxis="{Binding ElementName=scadaStatusStatisticXAxis}"YAxis="{Binding ElementName=scadaStatusStatisticYAxis}" ><ig:StackedColumnSeries.Series><ig:StackedFragmentSeries ValueMemberPath="Status1"Title="Operation" /><ig:StackedFragmentSeries ValueMemberPath="Status2"Title="Technical Problems" /><ig:StackedFragmentSeries ValueMemberPath="Status3"Title="Maintenance" /></ig:StackedColumnSeries.Series></ig:Stacked100ColumnSeries></ig:XamDataChart.Series></ig:XamDataChart><ig:Legend x:Name="scadaStatusStatisticLegend"Grid.Column="0"Content="{x:Static res:Labels._LegendTitle}"ig:XamDock.Edge="OutsideRight"ig:XamDock.VerticalDockAlignment="Center"ig:XamDock.HorizontalDockAlignment="Right"Margin="-5,0,5,0"/>
Here is the viewmodel:
Public
Sub New()Dim statisticDataList = New ObservableCollection(Of StatisticData)statisticDataList.Add(New StatisticData("01/2010", 80, 10, 5))statisticDataList.Add(New StatisticData("02/2010", 10, 20, 2))ScadaStatusStatisticDataList = statisticDataListEnd Sub
Private
_scadaStatusStatisticDataList As ObservableCollection(Of StatisticData)Public Property ScadaStatusStatisticDataList() As ObservableCollection(Of StatisticData)GetReturn _scadaStatusStatisticDataListEnd GetSet(ByVal value As ObservableCollection(Of StatisticData))_scadaStatusStatisticDataList = valueOnPropertyChanged(ScalarProperty.ScadaStatusStatisticDataList.ToString())End SetEnd Property
And the data class:
Class StatisticDataPublic Property GroupName As StringPublic Property Status1 As DoublePublic Property Status2 As DoublePublic Property Status3 As DoublePublic Sub New(ByVal groupName As String, ByVal status1 As Double, ByVal status2 As Double, ByVal status3 As Double)Me.GroupName = groupNameMe.Status1 = status1Me.Status2 = status2Me.Status3 = status3End SubEnd Class
Thanks for your help,-olivier-
I have investigated your issue and, I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 92164. I will create a private for each of you to keep you posted on the resolution.
Sincerely,ValerieDeveloper Support Engineer Infragisticswww.infragistics.com/support
I have the same problem as you do,
Since it works with StaticResource, it means they are dependency properties, but I have no idea why it doesn't work when binding with the ViewModel (other types of charts work fine with those bindings).
Thanks in advance,
Sébastien De Prins