Is there any way to easily add a reference line (45degree) to a chart without completely adding a new series to the chart? Basically I just want to be able to turn this on and off w/o having to add the series
If it cant be done w/o adding a series. is there a way to add a series to the chart WITHOUT having it impact the actual axis max and min values?
For example, I add a series with 2 points
pt1: x=double.MaxValue y=Doublt.MaxValue
pt2: x=double.MinValue y=Doublt.MinValue
Hi RodBillett,
I have constructed and attached a sample which produces the behavior that you have described; wherein a reference line, at a 45 degree angle relative to the chart’s dimensions with an origin of (0,0) and a terminal point of (xMax, yMax) is added to the chart without affecting the min/max values of the chart’s axes.
This approach adds an additional ScatterLine series to the XamDataChart which contains two data points, one each for the origin and terminal points of the reference line; these points are calculated using the min/values for each axis and will need to be updated whenever the data that the chart is bound to is modified, where that data may alter the axis range.
Please find the sample attached.
If you have any further questions, please let me know.
Sincerely,Chris KDeveloper Support EngineerInfragistics, Inc.www.infragistics.com/support
Not a viable option for our application as we want the axis scale to automatically be generated. Our application allows users to dynamically create charts utilizing our in-house data files - they already have an option for Auto scale or fixed scale on the axis.
All we are wanting is the y=x reference line - very similar to adding a trendline.
Hi RodBillet,
It will be possible to add the additional series, without impacting the axis min/max values, (assuming that the said axis is numeric) by applying a set quantity to the min and max values for the axis; this will fix the axis to the specified range.
I have included the following link to our online documentation regarding the application of a fixed range to numeric axes of the XamDataChart, for reference.
http://help.infragistics.com/NetAdvantage/WPF/Current/CLR4.0/?page=xamDataChart_Axis_Range.html
If you have any further questions regarding this behavior, please let me know.
Hi RidBillett,
Adding a reference line to the chart will require that you associate the line components with a series, as you mentioned above; I am currently looking into your second inquiry and I will be following up with you via this forum thread with my findings.
If you have any further questions in the meantime, please let me know.