Define Line chart for GridChart or standalone mode.
Mydb.dbLineChart = "Legend| Name0| X0| Y0| ... Name39|X39|Y39"
| Keyword | Description |
|---|---|
| Legend | True|false(Def) - Display Legends. |
| Name | Name of Line. |
| X | FieldNameOrNumber providing the X-axis dataset (0-39) values. |
| Y | FieldNameOrNumber providing the Y-axis dataset (0-39) values. |
Overide the values with dbChartParams.
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.
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
Dim CSV As String = "F1,F2,F3" & vbCrLf & "100,22,176" & vbCrLf & "150,23,67" & vbCrLf & "200,49,50" & vbCrLf
CSV &= "250,150,95" & vbCrLf & "300,231,48" & vbCrLf & "350,280,102" & vbCrLf & "400,654,200" & vbCrLf
CSV &= "450,534,100" & vbCrLf & "500,678,123" & vbCrLf & "550,654,32" & vbCrLf & "600,978,45" & vbCrLf & "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>
z Class | Tornado Namespace | dbPieChart | dbBarChart | dbColumnChart | dbLineChart | dbAreaChart | dbBubbleChart | Special Topic - Charting