Recently, I use canvas to plot on xamdatachart , also attempt get back x and y axes position, but it seem different object in develop frame.
The information of position not correspond between canvas and xamdatacharth. i provide a figure which mark three red circle in x axes(date point)
and canvas line(dotted blue line). Actually, canvas line get x position can not precisely project in xamdatachart's x axes(date point). If any function
which like "Ruler" object that auto provide xamdatachart x axes information without use canvas
Hello,
If I understand your inquiry correctly, you would like to know how to convert the coordinate of the chart to that of the canvas. Is this correct?
If it is the case, methods on the axes of the chart (ScaleValue and UnscaleValue) should help you move from the axis values into the pixel space of the chart, and vice versa:
// get a pixcel space of the chart from the axis values. xAxis1.ScaleValue(xAxisValue); yAxis1.ScaleValue(yAxisValue); // get axis values from a pixcel space of the chart. xAxis1.UnscaleValue(pointX); yAxis1.UnscaleValue(pointY);
ScaleValue method:https://ko.infragistics.com/help/wpf/infragisticswpf.controls.charts.xamdatachart~infragistics.controls.charts.axis~scalevalue
UnscaleValue method:https://ko.infragistics.com/help/wpf/infragisticswpf.controls.charts.xamdatachart~infragistics.controls.charts.categoryaxisbase~unscalevaluehttps://ko.infragistics.com/help/wpf/infragisticswpf.controls.charts.xamdatachart~infragistics.controls.charts.numericaxisbase~unscalevalue
Could you give them a try?And if my understanding is not correct, please let me know.