Define Line chart for GridChart or standalone mode.

dbQP Abbr: lnch

Version: Gold

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

Syntax

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

Field Value

Mydb.dbLineChart = "Legend| Name0| X0| Y0| ... Name39|X39|Y39"
KeywordDescription
LegendTrue|false(Def) - Display Legends.
NameName of Line.
XFieldNameOrNumber providing the X-axis dataset (0-39) values.
YFieldNameOrNumber 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, save to scratch directory and then open it as csv datasource with 3 columns - F1, F2 and F3. F1 is the x-axis and F2, F3 are the two datasets. The dbLineChart will plot the two lines 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 &amp; "100,22,176" & vbCrLf &amp; "150,23,67" & vbCrLf &amp; "200,49,50" & vbCrLf
  CSV &= "250,150,95" & vbCrLf &amp; "300,231,48" & vbCrLf &amp; "350,280,102" & vbCrLf &amp; "400,654,200" & vbCrLf
  CSV &= "450,534,100" & vbCrLf &amp; "500,678,123" & vbCrLf &amp; "550,654,32" & vbCrLf &amp; "600,978,45" & vbCrLf &amp; "650,654,100"
  Dim util As New Tornado.Util
  util.WriteFile("c:\inetpub\wwwroot\tornado\scratch\TestLine.Csv", CSV)
  Dim Bar As New Tornado.z
  With Bar
    .dbQP = "U=5| S=13| PS=-1| Ni=none| M=Gc| Q=Select * From TestLine.Csv| Dt=TEXT| Pv=OLEDB"
    .dbDSN = "/tornado/scratch"
    Dim Cp As String = "dataset2xValues=15,19,29,78,231,290| dataset2yValues=321,543,890,123,890,576" & _
      "|dataset2name=Line Two| TitleString=3 Lines| dataset2image=./_greenball.gif"
    .dbChartParams = Cp
    .dbLineChart = "Name0=Line Zero| X0=0| Y0=1| Name1=Line One|X1=0|Y1=2"
    .dbTextHolder = "Title=Line Chart"
    .ASPdbNET()
  End With 
End Sub
</script>
The following code allow user to specify the color of each dataset which is reflected in the legend.
CopyVB.NET
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
Dim Col As New Tornado.z
With Col  '... default = indColumnApp,  use ColumnApp for color/legend control.
    .dbQP = "U=25| D=nwind| S=5| PS=5| M=Gc"
    .dbSQL = "SELECT OrderID, sum(UnitPrice) as UnitPrice, sum(Quantity) as Qty from [Order details] Group by OrderId"
    .dbChartParams = "Type=Column|xAxisLabelAngle=45|yAxisTitle=My Y-Axis Title| xAxisTitle=My X-Axis Title| yAxisOptions=rotateTitle=true| dataset0color=red| dataset1color=green| dataset0name=BLUE| dataset1name=RED"
    .dbColumnChart = "Legend=t| Label=#0#| DataSet0=#1#| DataSet1=#2#"
    .dbTextHolder = "Title=Column Chart"
    .ASPdbNET()
End With
</script>

See Also