WPF equivalent of Forms - CustomOrigin ?

Your Winforms AreaChart has a CustomOrigin property which allows me to set the area base to a negative number instead of the default of zero.

eg display the series -2,-1,0,1,2,3,4,5,4,3,2,1,0,-1,-2   as a single triangle with a base of -2

How do I do this in WPF?

3 Replies

MK Muneesh Kumar G Syncfusion Team July 29, 2013 11:45 AM UTC

Hi Dennis,

Thanks for using Syncfusion products.

You can achieve your requirement by applying below code snippet:

Code snippet [XAML]: 

<chart:ChartArea.PrimaryAxis>

<chart:ChartAxis  chart:ChartArea.ShowGridLines="False"

chart:ChartArea.ShowOriginLine="True" Origin="2"

SmallTicksPerInterval="0">

<chart:ChartArea.OriginLineStroke>

<Pen Brush="Brown" Thickness="3"/>

</chart:ChartArea.OriginLineStroke>

</chart:ChartAxis>

</chart:ChartArea.PrimaryAxis>

<chart:ChartArea.SecondaryAxis>

<chart:ChartAxis chart:ChartArea.ShowGridLines="False"

chart:ChartArea.ShowOriginLine="True" Origin="1"

SmallTicksPerInterval="0">

<chart:ChartArea.OriginLineStroke>

<Pen Brush="Brown" Thickness="3"/>

</chart:ChartArea.OriginLineStroke>

</chart:ChartAxis>

</chart:ChartArea.SecondaryAxis>

We have prepared a sample based on this and you can find the sample under the following location:

Please let us know if you have any queries.

Regards,

Muneesh Kumar G.



Sample_b33cfb49.zip


DB Dennis Beaugrand August 2, 2013 09:20 PM UTC

Just what I needed!

key code is :
<ChartArea.PrimaryAxis
    <ChartAxis Origin="-1"  />

Thanks


MK Muneesh Kumar G Syncfusion Team August 5, 2013 10:15 AM UTC

Hi Dennis,

Thanks for the update.

Please let us know if you require any other assistance from us.

Regards,

Muneesh Kumar G.

Loader.
Up arrow icon