dotnetclassic Posted December 23, 2008 Report Share Posted December 23, 2008 On Mouse Move e.value is always Zero please help Chart1.Data.Clear() Chart1.DataSourceSettings.Fields.Clear() Chart1.Gallery = Gallery.Candlestick Chart1.DataSourceSettings.Fields.Add(New FieldMap("Date", FieldUsage.XValue)) Chart1.DataSourceSettings.Fields.Add(New FieldMap("Low", FieldUsage.Value)) Chart1.DataSourceSettings.Fields.Add(New FieldMap("Open", FieldUsage.Value)) Chart1.DataSourceSettings.Fields.Add(New FieldMap("Close", FieldUsage.Value)) Chart1.DataSourceSettings.Fields.Add(New FieldMap("High", FieldUsage.Value)) Chart1.DataSourceSettings.Fields.Add(New FieldMap("Volume", FieldUsage.NotUsed)) Chart1.DataSource = dw Private Sub Chart1_MouseMove(ByVal sender As Object, ByVal e As ChartFX.WinForms.HitTestEventArgs) Handles Chart1.MouseMove ToolStripStatusLabel1.Text = e.Value.ToString End Sub Quote Link to comment Share on other sites More sharing options...
dotnetclassic Posted December 23, 2008 Author Report Share Posted December 23, 2008 actually i want to show volume which is hidden in chart1.datasource when mouse on a point in graph area. like DirectCast(DirectCast(Chart1.DataSource, DataView)(currentPoint)("Volume"), Integer) Quote Link to comment Share on other sites More sharing options...
TomasT Posted December 23, 2008 Report Share Posted December 23, 2008 Hi, In order to obtain the value during mouse move, we would have to perform a HitTest call every time the mouse is moved, which can add substantial overhead and affect performance. For that reason it was not enabled by default. If you need it, all you need ot do is place the call yourself inside the event handler: void chart1_MouseMove(object sender, ChartFX.WinForms.HitTestEventArgs e) {ChartFX.WinForms.HitTestEventArgs hit = chart1.HitTest(e.X, e.Y);double myValue = hit.Value; } Hope this helps. TT CFX7_RealTimeWebSample.zip Quote Link to comment Share on other sites More sharing options...
dotnetclassic Posted December 24, 2008 Author Report Share Posted December 24, 2008 thanx to reply its working gr8 but on mouse move index is not returning correctly some time. Some time index on correct index and some time its near index value DirectCast(DirectCast(Chart1.DataSource, DataView)(currentPoint)("Volume"), Integer) like records are 1.value1 date:1/1/2008 2.value2 date:1/2/2008 3.value3 date:1/3/2008 If mouse on 1/2/2008 then some time its return correct value and some time its return value of 1/1/2008 any help???? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.