If you use dbchart, it is assumed that the database is as follows: A B1 22 23 34 2A as an X-axis, Y as a Y-axis, display graphics 43 x / / 2 x - x x1 1 2 3 4 I want to display the following graphic (a as Y Axis, B as an X-axis) 4 x / 3 x / 2 x | 1 x 1 2 3 4 However, if the A is used as the Y-axis, B is used as the x-axis, the result is 4 x | / 3 | X | 2 x | 1 x 1 2 3 4
I personally think that DBCHART's line must be determined in X when implementing, so it cannot be implemented in Y, X, Solution,
The record will be critical, such as the original
A B1 22 23 34 2
A b end point coordinate X end point coordinate Y 1 2 2 22 2 3 33 3 4 24 2 4 2
Note: SELECT * form table name in AdoQuery1 Order by X Desc
Var Firx, FIRY: DOUBLE; Begin with AdoQuery1 Do Begin First; Firx: = FIELDBYNAME (X) .AME (Y) .asfloat; Edit; FieldByname ('end point coordinate x'). asfloat: = FIRX; FieldByname ('end point coordinate y'). Asfloat: = FIRY; Post; Next; While NOT EOF DO BEGIN
Edit; FieldByName ('endpoint coordinate x'). Asfloat: = FIRX; FieldByname ('endpoint coordinate y'). Asfloat: = firy; post; firx: = fieldByname (edit1.text) .asfloat; firy: = FIELDBYNAME (edit2 .Text) .ASFLOAT; NEXT; END;
Then use the series arrow in dbchart to display