We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

On Property changed , SfChart (Line Series ) Shows data when we Zoom in and Zoom out

<chart:SfChart x:Name="Chart"  VerticalOptions="FillAndExpand"   HeightRequest="200" >
                                <chart:SfChart.ChartBehaviors>
                                         <chart:ChartZoomPanBehavior EnableSelectionZooming="False"   MaximumZoomLevel="0" EnableDoubleTap="True" />
                               </chart:SfChart.ChartBehaviors>
                               <chart:SfChart.PrimaryAxis>
                                                   <chart:CategoryAxis EnableAutoIntervalOnZooming="False">
                                                  <chart:CategoryAxis.Title>
                                                                          <chart:ChartAxisTitle Text="Months"/>
                                                  </chart:CategoryAxis.Title>
                                                  </chart:CategoryAxis>
                                                  </chart:SfChart.PrimaryAxis>
                                                  <chart:SfChart.SecondaryAxis>
                                                   <chart:NumericalAxis >
                                                    <chart:NumericalAxis.Title>
                                            <chart:ChartAxisTitle Text="Salary"/>
                                        </chart:NumericalAxis.Title>
                                    </chart:NumericalAxis>
                                </chart:SfChart.SecondaryAxis>

                                <chart:SfChart.Series>
                                             <chart:FastLineSeries EnableTooltip="true" ListenPropertyChange="True"
                                                          XBindingPath="Month" 
                                                          YBindingPath="Salary"  
                                                          EnableAntiAliasing="False"
                                                          ItemsSource="{Binding ChartData}" 
                                                          EnableAnimation="False" StrokeWidth="1"/>
                           

                                </chart:SfChart.Series>
                            </chart:SfChart>

This chart:SfChart is inside scroll view 
I have made a property in View Model

        private ObservableCollection<ChartDataModel> _chartData = new ObservableCollection<ChartDataModel>();
        public ObservableCollection<ChartDataModel> ChartData
        {
            get => _chartData;
            set
            {
                _chartData = value;
                RaisePropertyChanged();
                MeasureRenderingTime();
            }
        }
-------------------------------------------------------------***************************_________________________________________
Fist Step - In Initilize function of View Model , I have made a call , which works pretty fine , But when i change the value in drop down and wish to get the desired output in charts , Nothing is shown , I have to zoom in zoom out 2- 3 times , then data loads . 



Attachment: Video_a55a633e.zip

1 Reply

BK Bharathiraja K Syncfusion Team May 17, 2019 10:37 AM UTC

Hi Nancy, 
 
Greetings from Syncfusion. We have checked the video and not figured the reported issue in the attached video, it seems like delay in render the chart.  
 
You have reported that after multiple time of zoom performed chart is updated, but in the video, it not seems like performing zoom.  
 
We suspect that you are using category Axis in Chart. When you have large amount of data in category axis, it will affect the performance since it is always rendered based on the index value. So, we suggest follow the chart performance improvement blog.  
 
 
Still you are facing performance related issue, please share your Mock-up project or code snippet with data points used in your application with replication steps. This will be helpful for us to investigate further and provide you a better solution at the earliest. 
 
Regards, 
Bharathi. 


Loader.
Up arrow icon