Define Area chart for GridChart or standalone mode.
Namespace:
TornadoAssembly: Tornado (in Tornado.dll) Version: 12.6.0.9 (1.0.0.0)
Syntax
| C# |
|---|
public string dbAreaChart { get; set; } |
| Visual Basic (Declaration) |
|---|
Public Property dbAreaChart As String |
Field Value
Mydb.dbAreaChart = "Legend| Label| Name| Y|...Name39| Y39"| Keyword | Description |
|---|---|
| Legend | True|false(Def) - Display Legends. |
| Label | FieldNameOrNumber providing the X-axis labels. |
| Name | Name of Line used by Legends. |
| Y | FieldNameOrNumber providing the Y-axis dataset (0-39) values. |
Remarks
Check HTML dump for defaults.
Overide the values with dbChartParams.
Examples
This example creates a csv file with one label and 2 datasets, save to scratch directory and then open it
as csv datasource with 3 columns - F1, F2 and F3. F1 is the label-axis and F2, F3 are the two datasets.
The dbAreaChart will plot the two areas with default settings. A third line is created manually in
dbChartParams with it's own settings.
CopyVB.NET
<script language="VB" runat="server"> Sub Page_Load(Src As Object, E As EventArgs) Dim CSV As String = "F1,F2,F3" & vbCrLf & "L1,22,176" & vbCrLf & "L2,23,67" _ & vbCrLf & "L3,49,50" & vbCrLf & "L4,150,95" & vbCrLf & "L5,231,48" & vbCrLf _ & "L6,280,102" & vbCrLf & "L7,654,200" & vbCrLf & "L8,534,100" & vbCrLf & "L9,678,123" _ & vbCrLf & "L10,654,32" & vbCrLf & "L11,978,45" & vbCrLf & "L12,654,100" Dim util As New Tornado.Util util.WriteFile("c:\inetpub\wwwroot\tornado\scratch\TestArea.Csv", CSV) Dim Area As New Tornado.z With Area .dbQP = "U=5| S=14| PS=-1| Ni=none| M=Gc| Q=Select * From TestArea.Csv| Dt=TEXT| Pv=OLEDB" .dbDSN = "/tornado/scratch" Dim Cp As String = "dataset2yValues=321,543,890,123,890,576,400,300,200,250,400,500" & _ "|dataset2name=Area Two| TitleString=3 Areas" .dbChartParams = Cp .dbAreaChart = "Label=0| Name0=Area Zero| Y0=1| Name1=Area One| Y1=2" .dbTextHolder = "Title=Area Chart" .ASPdbNET() End With End Sub </script>