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

dbQP Abbr: cg
Version: All ///

Namespace:  Tornado
Assembly:  Tornado (in Tornado.dll) Version: 12.6.0.9 (1.0.0.0)

Syntax

C#
public string dbColGraph { get; set; }
Visual Basic (Declaration)
Public Property dbColGraph As String

Field 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.gifcg_beige.gifcg_black.gifcg_blue.gifcg_chrome.gifcg_darkgreen.gifcg_gold.gifcg_lightgreen.gifcg_lilac.gifcg_redchrome.gifcg_violetaqua.gifcg_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

Remarks

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

Examples

CopyC#
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