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
close icon

What would be the simplest way of superpose a line chart to a contour chart?

Hello,

I am trying to accomplish the following: having a SfChart on which I can have a ScatterSeries (representing data), a LineSeries (representing a trend, calculated by my own code logic) and to which I superpose a SfSurfaceChart in order to have a contour plot representing a kernel density estimation based on the same data from which I go the initial trend. Right now I am struggling at aligning the controls and synchronizing the calculations, is there an easier way of achieving this?

Regards,
Jeremie

3 Replies

RA Rachel A Syncfusion Team November 5, 2015 05:59 AM UTC

Hi Jeremie,

Thanks for contacting Syncfusion support.

We have prepared the sample based on your requirement by mapping the SfChart size to contour chart. You can download the sample from the following location.

Sample: SurfaceChart_WPF_Sample

You can get the output like the following image.



Regards,
Rachel. A



JC Jeremie Clos November 5, 2015 10:23 AM UTC

Hi Rachel,

Thank you for your fast answer. Is there any way to lock the ratios so that they stay superposed regardless of the user scaling the window?



RA Rachel A Syncfusion Team November 6, 2015 06:10 AM UTC

Hi Jeremie,

Thanks for the update.

We can achieve your requirement by mapping the contour size to SfChart in SizeChanged event. We have modified the sample for your reference and you can download the sample from the following location.

Sample: SfSurfaceChart_WPF_Sample
 
Regards,
Rachel. A

Loader.
Live Chat Icon For mobile
Up arrow icon