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.

Displaying several charts in one SfChart

Thread ID:

Created:

Updated:

Platform:

Replies:

127100 Oct 26,2016 03:39 AM Nov 1,2016 08:17 AM WPF 5
loading
Tags: SfChart
Dov
Asked On October 26, 2016 03:39 AM

Hi,

I'm trying to find a way to merge different SfCharts into one SfChart, between each of the charts there will be a separator that can be move.
 
I'm storing the data points of each SfChart into a xml file so that I could Deserialize the points into the SfChart. (That way I can view each SfChart separately).

How can I accomplish that?
 
Example for reference

Regards,

Dov.

Santhiya Arulsamy [Syncfusion]
Replied On October 27, 2016 07:11 AM

Hi Dov, 
 
Thanks for the update. 
 
We have prepared the sample based on your requirement by using the GridSplitter. Please find the sample from the following location. 
 
 
Also we can use the chart Row/Column definition property to place more than one chart in the single chart area (don’t have splitter support). Please refer to the following UG link for further information. 
 
  
Thanks, 
Santhiya A 
 


Dov
Replied On October 30, 2016 11:04 AM

Thank you, I have follow up questions:

1. The leftmost GridSplitter can be dragged outside the chart (into the yAxis labels), how can I prevent it from passing the yAxis?
2. I'm changing the background of the chart upon click event, when I press the leftmost chart the background changes to all the chart (include the yAxis labels) and about a 1 cm from the bottom of the chart. How can I change the background of the chart itself - FastLineSeries area only. (like the picture I added in the first thread)?
3. yAxis values are not correct for the 3 top charts, I'm not sure why.

Thank you.

Dov.

Attachment: MultipleSfChart_127081_4b66a641.rar

Muneesh Kumar G [Syncfusion]
Replied On October 31, 2016 07:57 AM

Hi Dov,  
  
Query 1:  The leftmost GridSplitter can be dragged outside the chart (into the yAxis labels), how can I prevent it from passing the yAxis?  
 
We can able to prevent a splitter passing over the y axis by setting MinWidth of first ColumnDefinition as per the below code snippet. 
 
Code Snippet [XAML]: 
 
<Grid.ColumnDefinitions> 
<ColumnDefinition Width="300" MinWidth="70"/> 
<ColumnDefinition Width="0.5"/> 
 
Query 2:  I'm changing the background of the chart upon click event, when I press the leftmost chart the background changes to all the chart (include the yAxis labels) and about a 1 cm from the bottom of the chart. How can I change the background of the chart itself - FastLineSeries area only. (like the picture I added in the first thread)? 
 
We can able to achieve your requirement by setting AreaBackground instead of setting Background property as per the below code snippet. 
 
Code Snippet [C#]: 
 
if( ( sfc.Name == chart1.Name ) || ( sfc.Name == chart2.Name ) || ( sfc.Name == chart3.Name ) ) 
{ 
sfc.AreaBackground = Brushes.DarkBlue; 
} 
 
if( sfc.Name != chart1.Name ) 
{ 
chart1.AreaBackground = null; 
} 
 
We have prepared a demo sample based on this and it can be downloaded from below link,   
 
Query 3: yAxis values are not correct for the 3 top charts, I'm not sure why. 
 
We don’t have splitter support in SfChart, so we have used GridSplitter in Grid.ColumnDefinitions. Here each chart have separate y axis for rendering, so we are unable to share single y axis with multiple chart.  
  
Please let us know if you have any queries. 
 
Thanks,  
Muneesh Kumar G  
 


Dov
Replied On November 1, 2016 07:31 AM

Thank you, It's working great.

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On November 1, 2016 08:17 AM

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.

;