Board index » delphi » DBChart Normalise

DBChart Normalise

Anybody know of a way to display numeric data from a table in a dbchart in
normalised form ie as maxvalue/values? (The table is an x-y list of values)

Pat

 

Re:DBChart Normalise


On Thu, 10 Oct 2002 14:21:52 +0100, "Pat Rundle"

Quote
<pat.run...@opsysdisplays.com> wrote:
>Anybody know of a way to display numeric data from a table in a dbchart in
>normalised form ie as maxvalue/values? (The table is an x-y list of values)

>Pat

If I am understanding your task, I would do this in two steps: one
query to get the max value(s) of the column(s), then a second query to
get the normalised values.

q1.SQL: SELECT MAX(field1) AS M1, MAX(field2) AS M2, ... FROM ...
WHERE ...
now get the values of M1, M2, etc into parameters for the second query
Then run the second query

q2.SQL : SELECT field1/;M1parameter, field2/:M2parameter, ...
FROM...WHERE...

This would give you a dataset with values in the range of 0 to 1.0

[There may be a way to do this in one query, but I haven't tried it]

HTH,
Dan

Other Threads