Imports MySql.Data
Imports System.Data.Odbc
Imports System.Web.UI
Imports InfoSoftGlobal
Imports System
Imports System.Collections
Imports System.Configuration
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI.HtmlControls
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Partial Class chart
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
FCLiteral.Text = CreateCharts()
End Sub
Function CreateCharts() As String
Dim strXML As String
strXML = "<chart caption='' subcaption='' xaxisname='รหัสโรค' yaxisname='จำนวน' theme='fint'>"
myCom = New MySqlCommand(inClassSql(0), myCon)
myDr = myCom.ExecuteReader
Dim i As Integer = 1
While myDr.Read()
strXML = strXML & "<set label='" & myDr("icd") & "' value='" & myDr("cicd10").ToString() & "' />"
i += 1
End While
myDr.Close()
strXML = strXML & "</chart>"
Return FusionCharts.RenderChart("FusionCharts/column2d", "", strXML, "FactorySum", "600", "350", False, False)
End Function
End Class