Display a column of numeric values as a horizontal bar chart in both grid and form mode with automatic data notmalizing option.
Mydb.dbColGraph="Field| Width| height| icon| style| Mini| Maxi| Format| MinMaxSQL"
Note: The group repeat starts at the FieldNameNumber and doesn't include the TableName.
| Keyword | Description |
|---|---|
| Field | Field name or number containing the numeric values. |
| Width | Width of the Bar. (def=500 for pixel styles) |
| Height | Height of the Bar. (Def=12) |
| Icon | Name of the .gif or .jpg file used to produce the chart. If "/" is not detected then system dbImagedir (/tornado/images-net) will be used. When Icon=rainbow then a random combo for the following color will be used. If image extension is missing then '.gif' is assumed. Bar colors -
|
| Style | Style (1-8) of bar chart.
|
| Mini,Maxi | These two value are only necessary when the data source is a user supplied. They must be set to pre-determined minimum and maximum values of the fields. |
| Format | Format the number at end of graph according to the MagicCell formats. |
| MinMaxSQL | SQL returning first field as Min and second field as Max. If MinMaxSQL="Auto" then ASP-db will scan the entire recordset for min/max. PageSize must be set to -1 (entire recordset) in order to be meaningful. When 'Auto' is used, SELECT * FROM Table is used with no filtering. Be careful when use this default as it is convinent but not efficient. Always try to use assign a valid Min/Max SQL with filtering like -> SELECT min(minfield), Max(maxfield) FROM Table where KeyField = Criteria |
Column data can be automatically normalized or a Min/Max scale be specified.
Dim CGraph As New Tornado.z
With CGraph
.dbQP = "U=13| M=g| S=1| PS=10| D=Nwind.Mdb| Gdf=0,1,2| Th=tit=Column Graph"
.dbColGraph = "(#!)field=Freight|width=300|height=12|icon=rainbow| style=8|" & _
"minmaxsql=SELECT min(Freight), Max(Freight) From Orders"
.dbSQL = "Select Orderid, CustomerID, Freight From Orders ORDER BY Freight DESC"
.ASPdbNET()
End With