My charts seem to work fine with internet explorer but they do not display with FireFox, Chrome, or Safari. Can someone suggest what the problem might be?
Protected Sub Page_PreRenderComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRenderComplete
' Generate chart in Literal Control
FCLiteral.Text = CreateCharts()
End Sub
Public Function CreateCharts() As String
Dim strXML As String = ""
If Session("Location") <> "--- Select Location ---" Then
Dim oConn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("TrafficCountsConnectionString").ConnectionString)
'Dim SQL As String = "SELECT * FROM countmaster WHERE loc_ID = [" + Session("location").ToString + "] ORDER BY _year"
Dim SQL As String = "SELECT * FROM countmaster WHERE (loc_ID = @Loc_ID) ORDER BY _year"
Dim oCommand As New SqlCommand(SQL, oConn)
oConn.Open()
oCommand.Parameters.AddWithValue("@Loc_ID", Session("Location"))
Dim oReader As SqlDataReader = oCommand.ExecuteReader
strXML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='800' height='400' id='Column2D' > "
strXML += "<param name='movie' value='FusionCharts/FCF_Column3D.swf?chartWidth=800&chartHeight=400' /> "
strXML += "<param name='FlashVars' value=" + Chr(34)
strXML += "&dataXML="
strXML += "<graph caption='Historical Traffic Volumes' subcaption='" + tcSelector1.Street + " - " + tcSelector1.Limits + "' xAxisName='Year' yAxisName='Volume (ADT)' decimalPrecision='0' formatNumberScale='0'>"
While oReader.Read()
If oReader("validation") = True Then
strXML += "<set name='" + oReader("_year").ToString.Trim + "' value='" + oReader("ADT").ToString.Trim + "' color='fFD8F8' />"
Else
strXML += "<set name='" + oReader("_year").ToString.Trim + "' value='" + oReader("ADT").ToString.Trim + "' color='AFD8F8' />"
End If
End While
strXML += "</graph>" + Chr(34) + " />"
strXML += "<param name='quality' value='high' /> "
strXML += "</object>"
oReader.Close()
oConn.Close()
Return strXML
Else
Return "Please select your count location"
End If
End Function
Thanks