RealTime update of a PieChart
Hi,
I'm using SfChart wirh PieSeries like below
I'm displaying live data and of course I want the chart to be update when data change.But seems it's not working properly.Actually it is working for change on the PrimaryAxis (Add/Remove pie slice)But it's not working for change on SecondaryAxis. I mean Count value changes do not update the PieChart. I need to fully reset the AppStatsList to have the PieChart updated.Is that the normal behavior?SfChart is not suposed to be real-time ?I have also attached a sample !
<chart:PieSeries EnableSmartLabels="true" EnableAnimation="True" ShowTooltip="True" chart:ChartTooltip.EnableAnimation="True" ItemsSource="{Binding SummaryViewModel.AppStatsList}" XBindingPath="Name" YBindingPath="Count" Margin="0"/>
public ObservableCollection<AppStats> AppStatsList { get { return _appStatsList; } }
public class AppStats : Syncfusion.Windows.Shared.NotificationObject { public string Name { get; set; } private int _count; public int Count { get { return _count; } set { _count = value; RaisePropertyChanged("Count"); } } }
Attachment: RtUpdate_64063d78.zip
Hi Rodolphe,
We have analyzed your requirement and you can achieve your requirement by setting the property ListenPropertyChange as true for the PieSeries as shown in the below code snippet.
Code Snippet [XAML]:
<chart:PieSeries ListenPropertyChange="True" x:Name="Pie" ConnectorType="Line" XBindingPath="Country" YBindingPath="Count" ItemsSource="{Binding Data}" EnableSmartLabels="true"
Please find the attached sample
Please let us know if you have any queries.
Thanks,
Mohammed Azarudeen.
Attachment: ListenPropertyChange_978c5275.zip
=> Only the first one got refreshed
Attachment: RtUpdate1_ef7df750.zip
Hi Rodolphe,
We have analyzed your requirement and we have prepared a sample based on your requirement (dynamically add data points and all points get refreshed). Please find the attached sample.
Please let us know if you have any queries.
Thanks,
Mohammed Azarudeen.
Attachment: ModifiedSample_4a3b8afd.zip
Sorry for the inconvenience caused.
We have analyzed your scenario and found an issue with 'ListenPropertyChange' that it doesn't works for the objects added dynamically to the underlying collection. We have logged this as defect. We would like you to create an incident for this issue to receive the fixed patch.
Please let us know, if you need any further assistance.
Thanks,
Rajkumar BR.
- 5 Replies
- 3 Participants
-
RB Rodolphe Billottet
- Oct 27, 2014 02:22 AM UTC
- Oct 29, 2014 10:18 PM UTC