• Making an asp bar graph

    Author
    Topic
    #387984

    Hi,
    I was wondering if anyone knew how to go about creating a bar graph in asp, extracting the data from an access database?. I was searching the net for tutorials/code, but they all seem to take the data from the asp page itself or a text file.
    This would be a really cool feature to have, and it would be so appreciated if someone could show me how .
    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #679425

      try here http://www.pstruh.cz/tips/detpg_html-bar-graph-chart.htm%5B/url%5D and other Google finds for “asp bar graph”

      • #679588

        Hi Peter,
        I did actually come across that page before, and I have done google searches. Just some of the code they provide I’ve found it a little bit of a challenge to use.
        However there is this amazing program called Swiff Chart Generator, that creates flash graphs. I downloaded it and reading up on it at the moment.

        • #682892

          A lot of the things I have seen for creating graphs on-the-fly (from whatever data source) require the purchase and installation of a COM object in IIS. We have used Graphics Server at my workplace and it does a good job with producing graphics, but the load time is a little slow and the temp image file tends to get large. I have seen discussions on using Office’s native Chart application but there are issues with configuring IIS to access this kind of functionality as there can be security risks and problems with load handeling in IIS as MS Chart is not, I believe, a multi-threading app.

          In short, from my experience, it is best to find, buy and install a COM application for IIS that allows ASP to hook into the extension and create your graphs.

          This site also has some further discussion of graphing in ASP: http://www.activeserverpages.ca/TUTORIALS/index.asp?c=e-co%5B/url%5D

        • #683731

          I looked at the link that Peter posted, and was able to make several graphs for a website log site. I’d be more then willing to show how I did it. (It pulls the data from an Access database). I have them setup to be pretty simple to add more charts to the system.

          • #683882

            Hi Drew
            That would be great, I also had a go at it, but just had too many problems getting it to work. If you’ve done a simple example, then that would be appreciated if you can show it to me.
            Thanks

            • #683900

              Okay, I am attaching a zipped file, that has 6 files.

              WebsiteLogs.mdb This is an Access 97 database, which holds ‘compacted’ web logs. (The 97 .mdb that holds the logs for our IIS webserver currently has 900,000+ records, and is 163 megabytes. I have a VB service that crunches the data into a format that is easier to run queries off of. The current crunched format is 11.1 megabytes, and even compacted, that’s several megs. (Most of the data is numbers, which don’t compact much).) The copy in this zip file only has one of the tables, and it has been stripped down to about 1 month’s worth of data (2-16-03 to 3-21-03).

              DayHitCount.cls, a VB Class, which simply holds a HitCount and a Date value.

              DayHitCounts.cls a VB Class which retrieves and sorts the data from the database, and holds it within a collection of DayHitCount Classes.

              modDBConnect.bas, a plain module that connects to the .mdb, of course the path would need to be changed. This file, plus the two .cls files, should be put into a VB .dll (mine is called WebLog.dll)

              dailyhitsrange.asp: This is an ASP page that lets you select a data range to view the data for.

              dailyhitsdata.asp: This page shows up in an inline frame within dailyhitsrange.asp, and displays a graph based upon the data range selected. Please note that there is some FrontPage formatting on these pages….too lazy to remove it, sorry.

              Hope this helps.

            • #684241

              Thanks heaps Drew, I havnt actually tried it out yet but will do soon and let you know how it went, really really appreciated.

            • #684464

              No problem. Let me know how it goes! I am attaching a screen shot of one of my charts. Just a little tip. The example on the website won’t print. I added a border thickness and border color property, so that it will print (boxes instead of filled in, but it’s there….)

            • #684476

              Excellent, I take it the customisation part is quite basic atleast. By the way, check out this flash graph, I got it from
              Planet Source code, It will make your jaw literally drop. I played around with it 2 weeks ago, but I dont have the basic knowledge of flash to modify it., as in to retrieve the desired data from access.
              Buts its really cool, another milestone in the history of graphing

            • #684585

              Pretty slick graph. I see how to work it, you just change the data within graphdat.txt. However, I don’t have Macro Media to edit the flash itself.

    Viewing 0 reply threads
    Reply To: Making an asp bar graph

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: