Jump to content


No Data Displaying


  • Please log in to reply
3 replies to this topic

#1 JerryCRH

JerryCRH

    Junior Member

  • Members
  • PipPip
  • 19 posts

Posted 20 March 2017 - 04:24 PM

     Dim connectionString10 As String
        Dim ds10 As New DataSet
        Dim stringxml10 As New StringBuilder
        Dim stringxml11 As New StringBuilder
        Dim stringxml12 As New StringBuilder

        connectionString10 = "Data Source=data;Initial Catalog=DB;User ID=User;Password=aaa"
        stringxml10.Append("<graph caption='Lab Order Turnaround Time' canvasbgalpha='0' bgimagealpha='30' bgimage='rx_photo9.jpg' bgimagescale='100' outCnvBaseFontSize='12' showValues='0' bgcolor='1BAFE0,FFFFFF' canvasbgColor='#F0F8FF' animate='1' PxAxisName='Time' SyAxisName='Total Orders' autoScaling='1'  >")
        Using conn10 As New SqlConnection(connectionString10)

            conn10.Open()
            Dim qry10 As New SqlCommand("select thedate, thehour, ordercount, " & _
           " avgtat " & _
            "from lab_order_tat_vw " & _
            "where thedate = CONVERT(varchar,getdate(),101)", conn10)
            Dim rst10 As SqlDataReader = qry10.ExecuteReader()
            stringxml10.Append("<categories> ")
            While rst10.Read()

                stringxml10.Append("<category label='" & rst10("thehour").ToString() & "' />")
                stringxml10.Append("</categories>")
                stringxml10.Append("<dataset seriesName='AvgTaT' showvalue='0'  color='#0000CD'>")
                stringxml10.Append("<set value='" & rst10("avgtat").ToString() & "' />")
                stringxml10.Append("</dataset>")
                stringxml10.Append("<dataset seriesName='TotalOrders' showvalue = '1' parentYaxis='S' renderAs='Line' style='Anim1' >")
                stringxml10.Append("<set value='" & rst10("ordercount").ToString() & "' />")

            End While
            rst10.Close()
            conn10.Close()

            stringxml10.Append("</dataset>")

            stringxml10.Append("<styles>  <definition> <style name='B' type='animation' easing='bounce' duration='1' /> <style name='Bevel1' type='bevel' angle='0' /> <style name='Anim1' type='animation' param='_xScale' start='0' duration='3' />  	<style name='Anim2' type='animation' param='_alpha' start='0' duration='3' easing='bounce' /> </definition> <application> 	<apply toObject='CANVAS' styles='Anim1, Anim2, Bevel1' /> ")
            stringxml10.Append("<apply toObject='DATAPLOT' styles='Anim1, Anim2, Bevel1, B' />")
            stringxml10.Append("</application> </styles>")

            stringxml10.Append("</graph>")
            'MsgBox(rst10("thehour").ToString)



        End Using
        Literal1.Text = FusionCharts.RenderChart("../FusionCharts/MSColumnline3D.swf", "", stringxml10.ToString(), "AvgTaT", "800", "400", _
         False, True)
   

I have the following piece of code.  I am getting "Invalid Data" message.  I know the query returns data.  Any help would be appreciated.

 

 



#2 soumya

soumya

    Junior Member

  • Members
  • PipPip
  • 19 posts

Posted 21 March 2017 - 06:29 AM

Hi,

 

You are using flash based version which has been deprecated. Please use upgraded version of FusionCharts and FusionCharts supported ASP.NET wrapper.

 

Please ensure that the xml structure generated after appending the string with the fetched value from database is according to FusionCharts prescribed xml format.

 

Meanwhile for further reference regarding rendering charts from database using VB.NET wrapper please visit http://www.fusioncha...using-database/

 

Hope this helps.

 

Thanks



#3 JerryCRH

JerryCRH

    Junior Member

  • Members
  • PipPip
  • 19 posts

Posted 21 March 2017 - 11:43 AM

Thanks for the reply.  I have questions regarding upgrading.  How does it effect my existing charts?  Can I upgrade and keep those charts as they are or do I need to rebuild all of them?

 

thanks



#4 soumya

soumya

    Junior Member

  • Members
  • PipPip
  • 19 posts

Posted 22 March 2017 - 07:40 AM

Hi,

 

FusionCharts now supports pure JavaScript charts and lot of things has been changed over the flash based version. You could check for further reference http://www.fusioncha...s-versions.html

 

You could also check the version history of FusionCharts  for more information on periodic up gradation http://www.fusioncha...ersion-history/

 

Thanks