Click to See Complete Forum and Search --> : ASP and Graph
cba321
12-20-2004, 08:11 PM
Hi,
I need to generate a horizontal graph in my webpage. I was wondering is there any way to do that with ASP? Either with MS Access or MS Excel for data update. Can anybody show me how?
Thanks
buntine
12-20-2004, 08:18 PM
I always just use ASP to generate the data and then graph it using HTML. There are components you can get which will create graphs for you.
Here is a bunch: http://www.aspin.com/home/components/graphics/charts
Regards.
cba321
12-20-2004, 08:34 PM
Hi buntine,
I need to update data on a single point to generate many graphs for different region. And these graphs will be displayed in different webpage according to the respective region.
For example;
Overall,RegionA,RegionB,RegionC
-All data is updated in Table.Overall
-Table.RegionA, Table.RegionB, and Table.RegionC automatically detects data in Table.Overall according to their region.
-and from here a graph will b generated according to data in Table.Overall in page1
- another graph will be generated according to data in Table.RegionA in page2 and so on.....
I think the best is by using MS Excel because there is some calculation involved. But how to do that with ASP?
russell
12-21-2004, 02:23 AM
take a look at the technique (and particularly the formula used) in this article (http://www.webreference.com/programming/javascript/charts/index.html). can be done pretty much the same way in asp (though it is a JavaScript article). Man, that's a long boring article, but a good technique, nonetheless.
Basically, you create a few 1px gifs, create a table, and stretch the images to a width (or height) proportional to 100%, or to the largest value.
Anyway, look at the formula in the article, and if that doesn't get it for ya, post back, and I'll write up a quick ASP example.
Bullschmidt
12-31-2004, 12:14 AM
I've got a free barchart ASP class (no components) downloadable from my Web site at http://www.bullschmidt.com/barchart.asp to help turn data stored in a table (or SQL statement) into a barchart.
To create a bar chart on a Web page you would include another Web page called jpschart.asp:
<!--#include file="jpschart.asp"-->
And the trick for using the chart with a recordset is the same concept as writing data to an HTML table from a recordset and that is this - within your loop through the recordset you retrieve values such as objRS("Sales") and in this case write those values to the chart object instead of writing those values to the HTML table.
Also you may want to check out the following:
Components: Graphics & Charts
http://www.aspin.com/home/components/graphics
cba321
01-03-2005, 08:38 PM
Thanks guys, for the replies and sites. I'll have a look and work on it first. See whether its working or not, then i'll get back to u guys. Thanks again.