Tornado API Library - V12.30.08

z.dbLineChart Property

Define Line chart for GridChart or standalone mode.

Product Version

Gold
[VisualBasic]
PublicPropertydbLineChartAsString
[C#]
publicstringdbLineChart{set;}

Property 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.

QuickProp Keyword Abbreviation

lnch

Remarks

Check HTML dump for defaults.

Overide the values with dbChartParams.

Example

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 &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>

See Also

z Class | Tornado Namespace | dbPieChart | dbBarChart | dbColumnChart | dbLineChart | dbAreaChart | dbBubbleChart | Special Topic - Charting