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.
Unfortunately, activation email could not send to your email. Please try again.

Changing axis values without rendering of the SfChart

Thread ID:

Created:

Updated:

Platform:

Replies:

127528 Nov 21,2016 10:58 AM Nov 23,2016 10:38 PM WPF 5
loading
Tags: SfChart
Dov
Asked On November 21, 2016 10:58 AM

Question 1:

I have a chart of 100K points that display a sine wave, xAxis value show the number of points (between 0 to 99999).

I would like to know if I can change the xAxis values with a mathematical equation so that the chart will remain the same (same proportion as well) but the values would change and that I won't need to render the chart from the beginning.

Let say multiply all xAxis by 10.

Is it possible?



Question 2:

Is it possible to add another NumericalAxis as a PrimaryAxis, so there will be 2. Both axis will be shown one above the other?


Regards,

Dov.

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On November 22, 2016 05:01 AM

Hi Dov, 
  
Thanks for Contacting Syncfusion Support 
 
Query 1: XAxis values would change and that I won't need to render the chart from the beginning.  
 
We are able to achieve your requirement by enabling the ListenPropertyChange property of series. When we are enabling the ListnPropertyChange property, chart will listen to the property changes of its underlying data object and it can be set as shown in below code snippet, 
  
 
            <chart:FastLineBitmapSeries ListenPropertyChange="True"> 
                                                                      
            </chart:FastLineBitmapSeries> 
 
 
  
We have prepared a demo sample based on this requirement and it can be downloaded from below link, 
  
Sample: SineWave 
  
Query 2: Is it possible to add another NumericalAxis as a PrimaryAxis 
  
We are able to achieve this requirement by defining the XAxis property of series as shown in the below code snippet, 
 
 
           <chart:FastLineBitmapSeries> 
 
                <chart:FastLineBitmapSeries.XAxis> 
                    <chart:NumericalAxis /> 
                </chart:FastLineBitmapSeries.XAxis> 
 
            </chart:FastLineBitmapSeries> 
 
  
Please refer our UG documentation link to know more about defining multiple axes 
  
Regards, 
Devi 


  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  


Dov
Replied On November 22, 2016 05:55 AM

Thank you for your fast reply.

In question 1 I've meant to skip on the part that you loop on the data and change it.
I wanted to change the axis values without the need to run on all the data.
I'm guessing it's not possible - just wanted to be sure.


I probably missed the "Multiple Axes" part in SfChart Axis - thank you for the link, I'll check it out.

Regards,

Dov.

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On November 23, 2016 06:45 AM

Hi Dov, 
  
Thanks for your update. 
  
We are able to change only the axis labels by defining CustomLabels for axis. In order to generate custom labels, we have to bind a collection to LabelsSource property of axis, which defines the content and position for the axis labels and it can be set as below code snippet, 
 
          <chart:FastLineBitmapSeries > 
                <chart:FastLineBitmapSeries.XAxis> 
                    <chart:NumericalAxis  LabelsSource="{Binding Labels}"  
                                          ContentPath="Content"  
                                          PositionPath="XValue" /> 
                </chart:FastLineBitmapSeries.XAxis> 
          </chart:FastLineBitmapSeries> 
  
Sample: SineCustomLabel 
  
Please refer our UG documentation link to know more about custom labels 
  
You can also edit the label content when the labels get created with LabelCreated event of axis and to know about the LabelCreated event, please refer the below UG documentation link, 
  
  
Regards, 
Devi 





Dov
Replied On November 23, 2016 07:45 AM

Great, thank you very much.

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On November 23, 2016 10:38 PM

Hi Dov, 
  
Thanks for your update. 
  
Please let us know, if you need any further assistance. 
  
Regards, 
Devi 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;