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
Separate Y axis on the same chart

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:CategoryXAxis  x:Name="catXAxis" ItemsSource="{Binding Data}"  Label="{}{Label}"/>
                <ig:NumericYAxis x:Name="numYAxis" >
                        <ig:AxisLabelSettings Location="OutsideLeft"/>

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

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

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

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



                <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}"/>



Thank you for your help.


  • 31130
    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.

    Associate Developer