Tornado API Library - V12.30.08

z.dbColGraph Property

Display a column of numeric values as a horizontal bar chart in both grid and form mode with automatic data notmalizing option.

Product Version

All
[VisualBasic]
PublicPropertydbColGraphAsString
[C#]
publicstringdbColGraph{set;}

Property Value

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.

KeywordDescription
FieldField name or number containing the numeric values.
WidthWidth of the Bar. (def=500 for pixel styles)
HeightHeight 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 - cg_aqua.gif cg_beige.gif cg_black.gif cg_blue.gif cg_chrome.gif cg_darkgreen.gif cg_gold.gif cg_lightgreen.gif cg_lilac.gif cg_redchrome.gif cg_violetaqua.gif cg_yellow.gif
StyleStyle (1-8) of bar chart.
  1. Character (e.g. "x") with no value displayed next to it.
  2. Character (e.g. "x") with value displayed next to it.
  3. Icon (e.g. "dollarsign.gif") with no value displayed next to it.
  4. Icon (e.g. "dollarsign.gif") with value displayed next to it.
  5. Icon Stretched (e.g. " cg_blue.gif") with no value displayed next to it.
  6. Icon Stretched (e.g. " cg_blue.gif") with value displayed next to it.
  7. Icon Shadowed (e.g. "cg_blue.gif") with no value displayed next to it.
  8. Icon Shadowed (e.g. "cg_blue.gif") with value displayed next to it.
Mini,MaxiThese 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.
FormatFormat the number at end of graph according to the MagicCell formats.
MinMaxSQLSQL 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

QuickProp Keyword Abbreviation

cg

Remarks

Column data can be automatically normalized or a Min/Max scale be specified.

Example

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

See Also

z Class | Tornado Namespace