User (Legacy) Posted July 31, 2002 Report Share Posted July 31, 2002 I am using Chartfx Client Server 5.0.6.0 I am new to Chartfx so I may not use the proper terms (please correct me if I am wrong.) I am trying to create a drill-down on my charts. What I need to do is get the values of the series item & x-axis item that the user clicked on. Is there a way to do this? Thanks Daniel Reber Datamasters, Inc Link to comment Share on other sites More sharing options...
Software FX Posted July 31, 2002 Report Share Posted July 31, 2002 You can use HitTest to retrieve the Series and Point index of a particular Pixel position, the you can uses these indexes to retrieve any other information from the chart such as labels, values, etc. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted July 31, 2002 Author Report Share Posted July 31, 2002 Thanks, but I still am not 100 % sure on what to do. Here is my code so far: Private Sub mChart_LButtonDblClk(ByVal x As Integer, ByVal y As Integer, ByVal nSerie As Integer, ByVal nPoint As Long, nRes As Integer) Dim eHit As ChartfxLibCtl.CfxHitTest eHit = mChart.HitTest(x, y, nSerie, nPoint) If eHit = HIT_AXISX Then mChart.PixelToValue ' What do I do here? Where do I get the rest of the arguements? End If End Sub mChart.PixelToValue <--What do I do here? Where do I get the rest of the arguements? Is this the correct method to use? Am I even close? Thanks Daniel Reber Datamasters, Inc "SoftwareFX Support" <support@softwarefx.com> wrote in message news:YRXdBsKOCHA.3520@webserver1.softwarefx.com... > You can use HitTest to retrieve the Series and Point index of a particular > Pixel position, the you can uses these indexes to retrieve any other > information from the chart such as labels, values, etc. > > -- > FP > Software FX, Inc. > > Link to comment Share on other sites More sharing options...
Software FX Posted July 31, 2002 Report Share Posted July 31, 2002 In particular in LButtonDblClk you already have the Series and Point index (ByVal nSerie As Integer, ByVal nPoint As Long) so you don't need to call HitTest. PixelToValue receives the Pixel position which you have as parameters (ByVal x As Integer, ByVal y As Integer) and it return the logical X and Y value into 2 double variables. Dim dx As Double Dim dy As Double ChartFX1.PixelToValue x, y, dx, dy, AXIS_Y If both nSerie and nPoint are > 0 (you hit a point) the you can also use the indexes to retrieve info from that point for example: ValueOfPointClicked = Chart1.ValueEx[nSerie,nPoint] LabelOfPointClicled = Chart1.Legend[nPoint] -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.