I have an Axis system with Min / Max Values .... How can i receive coordinates of an Mousclick inside of these Axis system as X,Y Values ? (VB)
Thanks and Best Regards
Values from Screen
Re: Values from Screen
Hello AGF,
I recommend that use the methods of axes CalcPosValue(), CalcPosXValue(),CalcPosYValue(), that I think help you to achieve as you want. And also, you can take a look in the Tutorial 4-Axis Control where you find any examples how you use these methods. If you have more questions about it please let me know.
Thanks,
I recommend that use the methods of axes CalcPosValue(), CalcPosXValue(),CalcPosYValue(), that I think help you to achieve as you want. And also, you can take a look in the Tutorial 4-Axis Control where you find any examples how you use these methods. If you have more questions about it please let me know.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Values from Screen
Dear Sandra,
like i understand the Calc funtions - they are depending on an existing ValueList eg. Series? But i have no Series, i have an xy "Grid" witch are defined from the Min/Max and increment of the axis and i want to get the position koordinates of an MouseClick in Values of the xyGrid - without any Series / ValueLists....
or i it necessary to add an empty series before i can receive values?
Thanks
like i understand the Calc funtions - they are depending on an existing ValueList eg. Series? But i have no Series, i have an xy "Grid" witch are defined from the Min/Max and increment of the axis and i want to get the position koordinates of an MouseClick in Values of the xyGrid - without any Series / ValueLists....
or i it necessary to add an empty series before i can receive values?
Thanks
Re: Values from Screen
Hello AGF,
Can you please, confirm us if previous code works as you expected?
I hope will helps.
Thanks,
If you want calculate the coordinates of the Axes, is necessary axes have values,otherwise if you try to calculate X and Y coordinates of Chart Grid, always you get zero, as result. Therefor, to calculate the correct values of axes coordinates, you need use method SetMinMax() to assign range of values to the axes, as do in next lines of code:like i understand the Calc funtions - they are depending on an existing ValueList eg. Series? But i have no Series, i have an xy "Grid" witch are defined from the Min/Max and increment of the axis and i want to get the position coordinates of an MouseClick in Values of the xyGrid - without any Series / ValueLists....
or i it necessary to add an empty series before i can receive values?
Code: Select all
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
InitializeChart()
' Add any initialization after the InitializeComponent() call.
End Sub
Private Sub InitializeChart()
TChart1.Axes.Bottom.SetMinMax(0, 10)
AddHandler TChart1.MouseClick, AddressOf tChart1_MouseClick
End Sub
Private Sub tChart1_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs)
Dim x As Double = TChart1.Axes.Bottom.CalcPosPoint(e.X)
Me.Text = x.ToString()
End Sub
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Values from Screen
Dear Sandra,
Thats it! Thanks a lot.
Thats it! Thanks a lot.