2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
To update the existing data points dynamically, set the ListenPropertyChange property of ChartSeries to true to let the SfChart to listen the Model property changes. The default value of this property is false. XAML: <chart:SfChart.Series> <chart:ColumnSeries x:Name="series" ItemsSource="{Binding Data}" XBindingPath="Value" YBindingPath="Size" ListenPropertyChange="True"> </chart:ColumnSeries> </chart:SfChart.Series>
Also, Model class should be implemented the INotifyPropertyChanged. The following code example illustrates model class for a reference. C#: public class ChartDataModel : INotifyPropertyChanged { public ChartDataModel(double value, double size) { Value = value; Size = size; } private double value; public double Value { get { return value; } set { this.value = value; RaisePropertyChanged("Value"); } } private double size; public double Size { get { return size; } set { size = value; RaisePropertyChanged("Size"); } } public event PropertyChangedEventHandler PropertyChanged; void RaisePropertyChanged(string name) { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(name)); } }
|
2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.