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

DataPoints are not plotting properly with Secondary Y Axis.

Thread ID:

Created:

Updated:

Platform:

Replies:

123465 Mar 20,2016 06:18 PM UTC Mar 21,2016 12:57 PM UTC WPF 1
loading
Tags: SfChart
Arumugam
Asked On March 20, 2016 06:18 PM UTC

I am facing a problem in plotting a values in Custom Y Axis.

My requirment is to plot 8 different set of datapoints into 8 different series. In that 3 series on primaryYAxis and 4 series on Secondary Y Axis and 1 Series on XAxis.
I am to plot the data to series properly, but the value which is not matches with the axes. Below are my xaml code snippet.

<chart:SfChart x:Name="valveSignatureChart" HorizontalHeaderAlignment="Center" Margin="10,0,10,5" Grid.Row="2"
                               AreaBackground="Silver" AreaBorderThickness="1" AreaBorderBrush="Gray" MinHeight="350">

                    <chart:SfChart.Header>
                        <TextBlock x:Name="txtValveSignature" FontSize="20" Margin="0,0,0,10"/>
                    </chart:SfChart.Header>

                    <chart:SfChart.Legend>
                        <chart:ChartLegendCollection>
                            <chart:ChartLegend DockPosition="Right" Margin="15,0,0,0" VerticalAlignment="Top" CheckBoxVisibility="Visible"/>
                        </chart:ChartLegendCollection>
                    </chart:SfChart.Legend>

                    <chart:SfChart.Behaviors>
                        <chart:ChartZoomPanBehavior EnablePanning="True" EnableMouseWheelZooming="True" ZoomMode="XY" ResetOnDoubleTap="True"/>
                    </chart:SfChart.Behaviors>

                    <chart:SfChart.PrimaryAxis>
                        <chart:NumericalAxis x:Name="primaryAxis" Header="Position %" Interval="20" RangePadding="Additional" ShowGridLines="True" />
                    </chart:SfChart.PrimaryAxis>

                    <chart:SfChart.SecondaryAxis>
                        <chart:NumericalAxis x:Name="secondaryAxis" Header="Position %" Interval="20" RangePadding="Additional" ShowGridLines="True" Visibility="Collapsed"/>
                    </chart:SfChart.SecondaryAxis>

                    <chart:SplineSeries EnableAnimation="True" x:Name="lnsUniversalInputOpen" ItemsSource="{Binding DataPoints}" XBindingPath="XAxisValues" YBindingPath="UniversalInputOpen">
                        <chart:SplineSeries.XAxis>
                            <chart:NumericalAxis x:Name="numericalUniversalXAxis" Visibility="Collapsed" Header="Universal input %" Interval="0.1" RangePadding="Additional" BorderThickness="0" ShowGridLines="True"/>
                        </chart:SplineSeries.XAxis>
                        <chart:SplineSeries.YAxis>
                            <chart:NumericalAxis x:Name="numericalUniversalYAxis" Visibility="Visible" Header="Universal input %" Interval="0.1" RangePadding="Additional" BorderThickness="0" ShowGridLines="True"/>
                        </chart:SplineSeries.YAxis>
                    </chart:SplineSeries>
                    <chart:SplineSeries EnableAnimation="True" x:Name="lnsPressureOutPut1Open" ItemsSource="{Binding DataPoints}" XBindingPath="XAxisValues" YBindingPath="PressureOutPutOneOpen">
                        <chart:SplineSeries.XAxis>
                            <chart:NumericalAxis x:Name="numericalPressureXAxis" Visibility="Collapsed" Header="{Binding PressureUnit}" Interval="5" RangePadding="Additional" BorderThickness="0" ShowGridLines="False" OpposedPosition="True"/>
                        </chart:SplineSeries.XAxis>
                        <chart:SplineSeries.YAxis>
                            <chart:NumericalAxis x:Name="numericalPressureYAxis" Visibility="Visible" Header="{Binding PressureUnit}" Interval="5" RangePadding="Additional" BorderThickness="0" ShowGridLines="False" OpposedPosition="True"/>
                        </chart:SplineSeries.YAxis>
                    </chart:SplineSeries>
                    <chart:SplineSeries EnableAnimation="True" x:Name="lnsPressureOutPut2Open" ItemsSource="{Binding DataPoints}" XBindingPath="XAxisValues" YBindingPath="PressureOutPutTwoOpen"/>
                    <chart:SplineSeries EnableAnimation="True" x:Name="lnsSupplyPressureOpen" ItemsSource="{Binding DataPoints}" XBindingPath="XAxisValues" YBindingPath="SupplyPressureOpen"/>

                    <chart:SplineSeries EnableAnimation="True" x:Name="lnsUniversalInputClose" ItemsSource="{Binding DataPoints}" XBindingPath="XAxisValues" YBindingPath="UniversalInputClose"/>
                    <chart:SplineSeries EnableAnimation="True" x:Name="lnsPressureOutPut1Close" ItemsSource="{Binding DataPoints}" XBindingPath="XAxisValues" YBindingPath="PressureOutPutOneClose"/>
                    <chart:SplineSeries EnableAnimation="True" x:Name="lnsPressureOutPut2Close" ItemsSource="{Binding DataPoints}" XBindingPath="XAxisValues" YBindingPath="PressureOutPutTwoClose"/>
                    <chart:SplineSeries EnableAnimation="True" x:Name="lnsSupplyPressureClose" ItemsSource="{Binding DataPoints}" XBindingPath="XAxisValues" YBindingPath="SupplyPressureClose"/>

                </chart:SfChart>


Suggest me. Thanks in advance.

Regards,
Arumugam

Sumathi Jayaraj [Syncfusion]
Replied On March 21, 2016 12:57 PM UTC

Hi Arumugam,
 
Thanks for contacting Syncfusion Support.
 
In order to refer the particular series y-axis with other series, we can bind the series y-axis to other series. If the series does not defined with y-axis means, it will refer the secondary axis of chart. We have prepared a sample with given code sample and it can be downloaded from the following location.
 
Sample : AxisSample
 
Regards,
Sumathi J

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

;