for the XamDataChart, what if I need to add more than one YAXis, like one for pressure (left side), one for temperature (right side). How to achieve this? also add the description of the YAXis (pressure or temperature)?
Thanks,
Joan
Hello Joan,
Thank you for your post. I have been looking into it and have created a small sample for you, named SecondaryYAxis. In the sample there are two LineSeries and for each of them there is a separate YAxis. For your second requirement I create a small legend describing the two series, place on the outside right position of the xamDataChart. Please refer to the attached sample and feel free to let me know if you require any further assistance on the mater.
Thank you for the sample. It's really helpful. but how to add a label for the YAXis? where to position it?
I have been looking into your post. You create the xmYRightAxis in the XAML code, then bind it to the LineSeries. You can set the following code <ig:LineSeries x:Name="lineSeries1" YAxis="{Binding ElementName=xmYRightAxis}" /> through the code behind as follows: this.lineSeries1.YAxis = xmYRightAxis. Here is a link from our documentation, where you can find more information about adding secondary YAxis. http://help.infragistics.com/Help/NetAdvantage/WPF/2012.1/CLR4.0/html/xamDataChart_Multiple_Axes.html. Please do not hesitate to let me know if you have any further questions or I have misunderstood your requirements.
I am just checking your progress on the issue. Please do not hesitate to let me know if you have any further questions.
Thank you! Set lineseries1.YAxis = xmYRightAxis works.
but now I have 2 sets of Grid on the chart since there are different ranges for the YAxis.
I tried to set the MajorStrokeThickness="0" to one of the YAxis, but then if the other YAxis is not show, none of grid is shown.
Is there an easy way to let xamChart do that?
Thank you for the post. I have been looking into it and I am not sure I understand you scenario. How is the grid you mentioned related with the chart and what chart are you using? In you first post you mentioned xamDataChart and in the last - xamChart. Having the answers to those questions will help me understand your scenario better. Thank you in advance for the cooperation.
I have attached a small sample, named SecondaryYAxis.zip, would you please modify the attached sample with your functionality in order for me to be able to reproduce your issue and provide you with better support. I am looking forward to your post.
xamChart is the xamDataChart. the grid I mean is the scale grid which is drawn by majorstorkethickness and minorstrokethickness.
I am just checking your progress on the issue. Please do not hesitate to let me know if you have any further questions on the mater.
Thank you for the post. I it normal when you have two Y axis to have two scales. One scale for each axis. I have modified the previous sample I have sent. In the modified sample I have added a button. On the click event of the button I am hiding the right Y axis. From the sample you can see that when the right Y axis is hidden the strokes are hidden together with the axis.Please find the attached sample and feel free to let me know if you have any further questions on the mater.