Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
90
Separate Y axis on the same chart
posted

Hi, could you help me with this ?

I need to draw 2 or more LineSeries in the same chart, but each line must have its own Y-Axis and all lines must share the same X-Axis.

I need something like this :

Here is my Xaml code which displays 3 lineseries but with the same Y-Axis :


        <ig:XamDataChart>

            <ig:XamDataChart.Axes>

                <ig:CategoryXAxis  x:Name="catXAxis" ItemsSource="{Binding Data}"  Label="{}{Label}"/>
                
                <ig:NumericYAxis x:Name="numYAxis" >
                    <ig:NumericYAxis.LabelSettings>
                        <ig:AxisLabelSettings Location="OutsideLeft"/>
                    </ig:NumericYAxis.LabelSettings>
                </ig:NumericYAxis>

                <ig:CategoryXAxis  x:Name="catXAxis1" ItemsSource="{Binding Data}"  Label="{}{Label}"/>

                <ig:NumericYAxis x:Name="numYAxis1" >
                    <ig:NumericYAxis.LabelSettings>
                        <ig:AxisLabelSettings Location="OutsideLeft"/>
                    </ig:NumericYAxis.LabelSettings>
                </ig:NumericYAxis>

                <ig:CategoryXAxis  x:Name="catXAxis2" ItemsSource="{Binding Data}"  Label="{}{Label}"/>

                <ig:NumericYAxis x:Name="numYAxis2" >
                    <ig:NumericYAxis.LabelSettings>
                        <ig:AxisLabelSettings Location="OutsideLeft"/>
                    </ig:NumericYAxis.LabelSettings>
                </ig:NumericYAxis>     


            </ig:XamDataChart.Axes>

            <ig:XamDataChart.Series>

                <ig:LineSeries ItemsSource="{Binding Data}" ValueMemberPath="Report1Density" XAxis="{Binding ElementName=catXAxis}"
                    YAxis="{Binding ElementName=numYAxis}"/>

                <ig:LineSeries ItemsSource="{Binding Data}" ValueMemberPath="Report2Density" XAxis="{Binding ElementName=catXAxis1}"
                    YAxis="{Binding ElementName=numYAxis1}"/>

                <ig:LineSeries ItemsSource="{Binding Data}" ValueMemberPath="Report3Density" XAxis="{Binding ElementName=catXAxis}"
                    YAxis="{Binding ElementName=numYAxis2}"/>

            </ig:XamDataChart.Series>

        </ig:XamDataChart>

Thank you for your help.

Alex.

Parents
No Data
Reply
  • 34430
    Offline posted

    Hello Alex,

    From the code that you have provided, it appears that you have multiple NumericY axes bound to the different series in your XamDataChart, and so I am rather unsure why you are unable to see the multiple Y Axes on your end? Strangely, your screenshot also appears like you are using multiple XamDataCharts rather than the one that appears in your provided XAML code. Would it be possible for you to please provide a sample project to demonstrate the behavior that you are currently seeing?

    I have created a new sample project using XAML code based on what you have provided, and I am seeing multiple Y Axes. I have attached this sample project so that you can review it. If the sample project works correctly, this may indicate an issue specific to your application. It will be very helpful if you could possibly modify it to demonstrate the issue you are seeing, or attach an isolated sample project of your own.

    If the sample project does not work correctly, this could indicate a possible difference in the environment between our two applications. My tests were made against version 16.1.20161.2183 of Infragistics for Silverlight 2016.1. If the project does not work correctly and you are using a different version, would it be possible for you to please indicate which version you are using?

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

    XamDataChartMultipleSeriesCase.zip
Children
No Data