Coldfusion script to draw graph

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • resmi318
    New Member
    • Jun 2007
    • 29

    Coldfusion script to draw graph

    Hi,

    I am new to coldfusion. I need to query a table to get some datas and then draw a graph using that. Can anyone help me?

    Thanks
    Resmi318
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    What code have you got so far? What kind of graph/chart do you want to draw?

    Comment

    • resmi318
      New Member
      • Jun 2007
      • 29

      #3
      Originally posted by acoder
      What code have you got so far? What kind of graph/chart do you want to draw?
      Hi,

      I dont have any code. A table is pesent. By querying that table I will get the x and y values to draw the graph. It should be a two dimensional line graph. The script should query the table and plot graph.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Originally posted by resmi318
        Hi,

        I dont have any code. A table is pesent. By querying that table I will get the x and y values to draw the graph. It should be a two dimensional line graph. The script should query the table and plot graph.
        Give some details about the table and what values you need.

        Comment

        • resmi318
          New Member
          • Jun 2007
          • 29

          #5
          Originally posted by acoder
          Give some details about the table and what values you need.
          Hi,
          Values will be like this

          Week_type Net
          25/05/2007 100
          01/06/2007 150
          08/06/2007 80
          15/06/2007 120

          These values will be present as two columns in the table.
          i need to draw graph with these.

          Thanks

          Comment

          • improvcornartist
            Recognized Expert Contributor
            • May 2007
            • 303

            #6
            You might be able to use the cfgraph or cfchartseries tag, depending on your version of ColdFusion.

            cfgraph
            cfchartseries

            Comment

            • resmi318
              New Member
              • Jun 2007
              • 29

              #7
              Originally posted by improvcornartis t
              You might be able to use the cfgraph or cfchartseries tag, depending on your version of ColdFusion.

              cfgraph
              cfchartseries
              Cold fusion version I am using is 7.
              Operating system is unix.
              Thanks

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                Originally posted by resmi318
                Cold fusion version I am using is 7.
                Operating system is unix.
                Thanks
                Then use cfchart and cfchartseries. Check the documentation and make an attempt. If you get stuck, post your code.

                Comment

                • resmi318
                  New Member
                  • Jun 2007
                  • 29

                  #9
                  Originally posted by acoder
                  Then use cfchart and cfchartseries. Check the documentation and make an attempt. If you get stuck, post your code.
                  Hi,

                  I used cfchart and cfchartseries to draw the graph and I got it. Thanks everybody for helping.

                  Now I need to get an excel sheet with data of the query when the user clicks on the graph. How can I do that? I found out how to get data in excel sheet but how to get it when user click on the graph? Please advice me?

                  Thanks
                  Resmi318

                  Comment

                  • acoder
                    Recognized Expert MVP
                    • Nov 2006
                    • 16032

                    #10
                    Originally posted by resmi318
                    Hi,

                    I used cfchart and cfchartseries to draw the graph and I got it. Thanks everybody for helping.
                    Glad you got it working and by yourself too. Well done!
                    Originally posted by resmi318
                    Now I need to get an excel sheet with data of the query when the user clicks on the graph. How can I do that? I found out how to get data in excel sheet but how to get it when user click on the graph? Please advice me?
                    If you can get data into an excel sheet using Coldfusion (or some other language), you can link to the url using (I think) the url attribute of the cfchart* tag.

                    Comment

                    Working...