(119 : 5) Error
Invalid DB Type - Version does not support TEXT data source

Line Chart
<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(server.mappath("/tornado/scratch/TestLine.Csv"), CSV)
  Dim Bar As New Tornado.z
  With Bar
    .dbQP = "U=5| S=17| PS=-1| Ni=none| M=Gc| Q=Select * From TestLine.Csv| Dt=TEXT| Pv=OLEDB"
    .dbDSN = "/tornado/scratch"
    Dim Cp As String = "TitleString=3 Lines| dataset2image=./_greenball.gif"
    Cp &= "|yAxisTitle=My Y-Axis Title| xAxisTitle=My X-Axis Title| yAxisOptions=rotateTitle=true"
    .dbChartParams = Cp
    .dbLineChart = "leg=t| Name0=Line Zero| X0=#0#| Y0=#1#| Name1=Line One|X1=#0#|Y1=#2#| Name2=Line Two|X2=15,19,29,78,231,290|Y2=321,543,890,123,890,576"
    .dbTextHolder = "Title=Line Chart"
    .ASPdbNET()
  End With 
End Sub
</script>
Simplified LineChart - Just specify the dbLineChart and override default parameters 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 using user data.


Send comments on this topic.
Copyright (c) 1998-2006 ASP-db