Sign in to follow this  
sucheendarnath

Using Fusion Chart in an Webuser Control

Recommended Posts

I use the following code in a webuser control and register it in an aspx page. Every thing is fine when first time page is loaded and postback also. But when asynchronous postback using ajax the charts are not rendering. help needed it just displays word chart

 

 

 

Dim da As New SqlDataAdapter(cmd)

 

Dim dtbl As New DataTable

 

da.Fill(dtbl)

 

Dim output As String

 

Dim strChartNode = String.Format("caption='sales by month' showBorder='0' labelDisplay='ROTATE' slantLabels='1' formatNumberScale='0' NumberPrefix='$' bgColor='FFFFFF'")

 

output = utils.DisplayFusionChart(strChartNode, dtbl, "", strChart, "saleschart", strWidth, strHeight)

 

Panel2.Controls.Clear()

 

Panel2.Controls.Add(New LiteralControl(output))

 

conn.Close()

 

 

 

 

 

 

 

Function DisplayFusionChart(ByVal strChartNode As String, ByVal dtbl As DataTable, ByVal strLink As String, _

 

ByVal strChart As String, ByVal strChartName As String, ByVal strWidth As String, ByVal strHeight As String) As String

 

 

 

Dim strXML As String

 

strXML = ""

 

For Each dr As DataRow In dtbl.Rows

 

If strLink <> "" Then

 

strXML += ""

 

Else

 

strXML += ""

 

End If

 

Next

 

strXML += ""

 

Return InfoSoftGlobal.FusionCharts.RenderChart(strChart, "", strXML.ToString(), strChartName, strWidth, strHeight, False, False)

 

End Function

Edited by Guest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this