User (Legacy) Posted April 23, 2003 Report Share Posted April 23, 2003 Using ChartFx trail with VFP6. I have a contour chart displaying in two dimensions with the value shown by colour and am trying to position and size an ellipse on the chart. First I can't attach to particular point/series coordinate. The .Attach seems to respond to the first (X) index value but not the series (Y) index. I've also tried attaching to the 3rd dimension (colour) value. Secondly I've tried using .ValueToPixel and .Axis(AXIS_Y/X).PixPerUnit to get the size of the ellipse to match the displayed coordinates and am not having success. Please can someone point me in the right direction? Link to comment Share on other sites More sharing options...
Software FX Posted April 24, 2003 Report Share Posted April 24, 2003 What specific parameters (including the value of the string) are you passing to the Attach method ? -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted April 27, 2003 Author Report Share Posted April 27, 2003 I've tried things like: lcPostnTxt = ALLTRIM(STR(lnAzim))+','+ALLTRIM(STR(lnElev)) loCircle.Attach (ATTACH_CENTER, lcPostnTxt) lcPostnTxt = "5,9" where 5 is the value of the horizontal axis and 9 is the value of the vertical axis. and lcPostnTxt = ALLTRIM(STR(lnAzim-lnMinX)) + ',' + ALLTRIM(STR(lnCentreValue)) *?lcPostnTxt loCircle.Attach (ATTACH_CENTER, lcPostnTxt) In this case lcPostnTxt = "15,11662" lnCentreValue was the value of a point and 15 is the point index in the series containing the 11662 value. Where lnAzim & lnElev are numbers (integers in this case but not necessarily). lnElev ranges from lnMinY to lnMaxY where each Y is a series of points. lnAzim is a number between lnMinX and lnMaxX where lnMinX would be the first point in each series. In the test case I have: lnMinX = -10 lnMaxX = 10 lnMinY = 0 lnMaxY = 12 lnAzim = 5 lnElev = 9 Link to comment Share on other sites More sharing options...
Software FX Posted April 28, 2003 Report Share Posted April 28, 2003 Ok. The problem here is that a the Attach method refers to logical X and Y coordinates to be mapped to the X and Y axis respectively. In a contour chart, there is no Y axis (the Y axis goes from "inside" the screen to the observer), there is only X and Z. There is no support for a Z axis in the annotation extension, so the attach method is not going to work for you here. The only API that can transform those X,Y,Z coordinates to X,Y coordinates is MarkerToPixel (PaintInfo method, CPI_MARKERTOPIXEL constant). This method allows you to determine the position of an specific point in the chart. You will need to know what points you want to encircle with this ellipse. If you explain to me exactly what are you trying to represent with this ellipse I might be able to help you calculate its position. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted April 29, 2003 Author Report Share Posted April 29, 2003 Thanks. What we expected of the contour chart was the same kind of logic and automatic axis scaling found on typical XY scatter charts. The lack of support for the Z axis both on the contour chart and annotation is a disappointment! For the moment I am again back working on another project. I may get back to you though! Andy Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.