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.
Syncfusion Feedback

Set the position of a chart series in sfchart

Thread ID:

Created:

Updated:

Platform:

Replies:

131225 Jun 29,2017 09:47 AM UTC Jul 4,2017 08:54 AM UTC Xamarin.Forms 5
loading
Tags: SfChart
yoavkamary
Asked On June 29, 2017 09:47 AM UTC

Hi,
I have multiple charts that overlay each other on the same graph and I want to set the position of a certain chart to be on front of the others.
I attached an example graph. In this example I would like the red line(BarVaAvg24H) to be in the first layer and the the other 3 charts will be behind.

Thanks in advanced
Yoav

Attachment: Simulator_Screen_Shot_29_Jun_2017,_12.37.59.png_4de5ed15.zip

Saravana Pandian Murugan [Syncfusion]
Replied On June 30, 2017 11:45 AM UTC

Hi Yoavkamary, 
  
Thanks for using Syncfusion products. 
  
In SfChart, ChartSeries will render based on the order it is added to ChartSeriesCollection. 
  
Regarding “In this example I would like the red line(BarVaAvg24H) to be in the first layer and the other 3 charts will be behind” 
  
For this requirement, you can add the LineSeries (red line) at last in the ChartSeriesCollection as per the code snippet. 
 
Code Example: 
  
 
<chart:SfChart.Series> 
  
      <chart:AreaSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue"/> 
  
      <chart:ColumnSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue"/> 
  
      <chart:LineSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue"/> 
  
</chart:SfChart.Series> 
  
  
Please let us know if you need further assistance on this. 
  
Regards, 
Saravana Pandian M. 


yoavkamary
Replied On July 1, 2017 07:16 PM UTC

Thanks a lot, exactly what I needed.

One more thing,
In the same chart I have attached the screen shot, I would like rain(blue bars) and irrigation(aqua bars) to use only Y axe together and not to have Y axe for each as currently.

Yoav


Saravana Pandian Murugan [Syncfusion]
Replied On July 3, 2017 07:02 AM UTC

Hi Yoavkamary,

You can achieve this requirement by hiding the other axis with the help of IsVisible property of ChartAxis. We have attached a sample for your reference which can be downloaded from the below location.

Sample: http://www.syncfusion.com/downloads/support/forum/131225/ze/HideAxis1729333255

Please check the sample and let us know if your requirement is different from this.

Regards,
Saravana Pandian M.


yoavkamary
Replied On July 3, 2017 08:29 AM UTC

Hi,
This is not the result I want. by setting IsVisible to false just hide the Y axe for this particular chart and not making this chart to use the remaining Y axe in relation with it's values.

For example it you look at the screen shot the rain chart mm range from 0 to 4+ and the irrigation char mm range from 0 to 11. what I need is one Y axe that will range for both of them.

Let me know if you need more 
explanation

Thanks


Saravana Pandian Murugan [Syncfusion]
Replied On July 4, 2017 08:54 AM UTC

Hi YoavKumary,

We have achieved your requirement by using the same YAxis to both the ChartSeries. We have modified the sample which can be downloaded from the below location.

Sample: http://www.syncfusion.com/downloads/support/forum/131225/ze/HideAxis1110186873

Please check the sample and let us know if you need further assistance on this.

Regards,
Saravana Pandian M.


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.

Warning Icon 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.Close Icon

;