473,799 Members | 3,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Graphs in ASP? ASP newb here

Does anybody know of techniques (or websites) where a graph is generated
based on data of an array?

Any advice on graphs and ASP is greatly appreciated...

Jan 6 '06 #1
12 2055
www.aspin.com search
plenty of stuff there
"Jose M Hernandez" <Jose M He*******@discu ssions.microsof t.com> wrote in
message news:C9******** *************** ***********@mic rosoft.com...
Does anybody know of techniques (or websites) where a graph is generated
based on data of an array?

Any advice on graphs and ASP is greatly appreciated...

Jan 6 '06 #2
=?Utf-8?B?Sm9zZSBNIEh lcm5hbmRleg==?= wrote on 06 jan 2006 in
microsoft.publi c.inetserver.as p.general:
Does anybody know of techniques (or websites) where a graph is generated
based on data of an array?

Any advice on graphs and ASP is greatly appreciated...


Any:

<hr style="height:1 0px;width:<%=x( 1)%>px;text-align:left;colo r:red;">
<hr style="height:1 0px;width:<%=x( 2)%>px;text-align:left;colo r:navy;">
<hr style="height:1 0px;width:<%=x( 3)%>px;text-align:left;colo r:green;">
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 6 '06 #3

"Jose M Hernandez" <Jose M He*******@discu ssions.microsof t.com> wrote in
message news:C9******** *************** ***********@mic rosoft.com...
Does anybody know of techniques (or websites) where a graph is generated
based on data of an array?

Any advice on graphs and ASP is greatly appreciated...

yes I made a scripting component to make charts, it works on a record set
being passed to it and has some percific code to my needs in it, but you
could alter it to use a array for your own needs

here is a example
http://wanews.org/economic/unemployment.asp

copy code into notepad

save as chart.wsc

then call like this
set chart = Server.CreateOb ject("chart.WSC ")
chart.chartLine ("Australian Interest
Rates","Interes tRates",300,200 ,rs1("minx"),rs 1("maxx"),rs2,0 ,7,"%","right", "")
and here is the code

<?xml version="1.0"?>
<component>

<registration
description="Ch art"
progid="Chart.W SC"
version="1.00"
classid="{bf770 420-5a73-4e1b-b5ce-f4f8a5448ee5}"

</registration>

<public>
<method name="chartLine ">
<PARAMETER name="heada"/>
<PARAMETER name="table"/>
<PARAMETER name="widthx"/>
<PARAMETER name="heightx"/>
<PARAMETER name="rangeLow"/>
<PARAMETER name="rangeHigh "/>
<PARAMETER name="recordSet "/>
<PARAMETER name="xCol"/>
<PARAMETER name="dCol"/>
<PARAMETER name="symbol"/>
<PARAMETER name="alignent"/>
</method>
</public>

<implements type="ASP" id="ASP"/>

<script language="VBScr ipt">
<![CDATA[
function
chartLine(heada ,table,widthx,h eightx,rangeLow ,rangeHigh,reco rdSet,xCol,dCol ,symbol,alignen t,bgColor)

Session.LCID = 3081
set bttt = server.CreateOb ject("MSWC.Brow serType")

dim ratio, rCount ,points ,counta ,leftx ,lefty ,spacex ,range ,line1
,line2 ,line3 ,test ,datex,color,di tString,datStri ng
test = true
color = "Blue"
line1 = ""
line2 = ""
line3 = ""
counta = 0
leftx = 50
lefty = 50
dateWhitlam = "December 2, 1972"
dateFraser = "november 11, 1975"
dateHawk = "march 11, 1983"
dateHoward = "march 2, 1996"

rCount = recordSet.Recor dCount
points = rCount / (widthx/25)
spacex = widthx / rCount
range = rangeHigh-rangeLow
ratio = heightx / range
line1 = "<TABLE style=""margin: 5"" BORDER=0 CELLSPACING=0 CELLPADDING=5
align=" & alignent & " height=" & heightx + 40 & " width=" & widthx + 80 & "
bgcolor=" & bgColor & ">"
line1 = line1 & "<TR><TD><S PAN
style=""font-family:arial;fo nt-weight:900"">" & heada & "</SPAN><DIV
STYLE=""positio n:relative;heig ht:" & heightx +85 & ";margin-top:20"">"
do until recordSet.EOF
'response.write recordSet(xCol)
if DateValue( recordSet(xCol) ) > DateValue(dateW hitlam) then
if DateValue( recordSet(xCol) ) > DateValue(dateF raser) then
if DateValue( recordSet(xCol) ) > DateValue(dateH awk) then
if DateValue( recordSet(xCol) ) > DateValue(dateH oward) then
color = "Blue"
else
color = "Red"
end if
else
color = "Blue"
end if
else
color = "Red"
end if
end if
line22 = "<v:line strokecolor=""" & color & """ from=""" & leftx & "," &
heightx - ((recordSet(dCo l) - rangeLow) * ratio) & """"
if bttt.browser = "IE" AND bttt.version => 6 then
line33 = "<DIV
style=""font-size:10;writing-mode:tb-rl;position:abs olute;top:" & heightx +
20 & ";left:" & leftx-5 & """>" & getAUSDate(reco rdSet(xCol)) & "</DIV>"
else
line33 = "<DIV
style=""font-size:9;writing-mode:tb-rl;position:abs olute;top:" & heightx +
20 & ";left:" & leftx-5 & """>" & Year(recordSet( xCol)) & "</DIV>"
end if
recordSet.MoveN ext
if not recordSet.EOF then
line22 = line22 & " to=""" & leftx + spacex & "," & heightx -
((recordSet(dCo l) - rangeLow) * ratio) & """ TITLE="""& recordSet(dCol)
&"""></v:line>"
else
line22 = ""
line3 = line3 & line33
end if
line2 = line2 & line22
leftx = leftx + spacex
if counta => pointsx and pointsx < (rCount - (points / 2)) then
pointsx = pointsx + points
if bttt.browser = "IE" AND bttt.version => 6 then
line3 = line3 & "<DIV
style=""font-size:10;writing-mode:tb-rl;position:abs olute;top:" & heightx +
20 & ";left:" & leftx-5 & """>" & getAUSDate(reco rdSet(xCol)) & "</DIV>"
else
datString = Year( recordSet(xCol) )
line3 = line3 & "<DIV
style=""font-size:9;writing-mode:tb-rl;position:abs olute;top:" & heightx +
20 & ";left:" & leftx-5 & """>" & datString & "</DIV>"
datString = ""
end if
end if
counta = counta + 1
loop
line3 = line3 & "<DIV style=""font-size:12;positio n:relative;top:-5"">" &
FormatNumber( rangeHigh,2) & symbol & "</DIV><v:line strokecolor=""b lack""
from=""" & lefty+10 & "," & -15 & """ to=""" & lefty + widthx & "," & -15 &
"""></v:line>"
line3 = line3 & "<DIV style=""font-size:12;positio n:relative;top: " &
heightx/2-25 & """>" & FormatNumber((( rangeHigh-rangeLow)/2)+rangeLow,2) &
symbol & "</DIV><v:line strokecolor=""b lack"" from=""" & lefty+10 & "," &
heightx/2-32 & """ to=""" & lefty + widthx & "," & heightx/2-32 &
"""></v:line>"
line3 = line3 & "<DIV style=""font-size:12;positio n:relative;top: " &
heightx-50 & """>" & FormatNumber( rangeLow,2) & symbol & "</DIV><v:line
strokecolor=""b lack"" from=""" & lefty & "," & heightx - 45 & """ to=""" &
lefty + widthx & "," & heightx - 45 & """></v:line>"
line3 = line3 & "</DIV><A HREF=""/pub/economic/xl/data.asp?tab=" & table &
""">Chart Data</A></TD></TR></TABLE>"
line = line1 & line2 & line3
chartLine = line

end function
function getAUSDate(dDat e)
dim d,m,y
d = Day(dDate)
m = Month(dDate)
y = Year(dDate)
getAUSDate = d &"/"& m &"/"& y
end function

]]>
</script>

</component>
Jan 6 '06 #4
t
Slim wrote:
"Jose M Hernandez" <Jose M He*******@discu ssions.microsof t.com> wrote in
message news:C9******** *************** ***********@mic rosoft.com...
Does anybody know of techniques (or websites) where a graph is generated
based on data of an array?

Any advice on graphs and ASP is greatly appreciated...


Here's one example not using any component, just pure asp and html:
http://www.u229.no/stuff/HTMLGraph/

t
Jan 6 '06 #5

"t" <la**@night.z z> wrote in message news:42******** *****@individua l.net...
Slim wrote:
"Jose M Hernandez" <Jose M He*******@discu ssions.microsof t.com> wrote in
message news:C9******** *************** ***********@mic rosoft.com...
Does anybody know of techniques (or websites) where a graph is generated
based on data of an array?

Any advice on graphs and ASP is greatly appreciated...


Here's one example not using any component, just pure asp and html:
http://www.u229.no/stuff/HTMLGraph/

t


you can use my code in a ASP page, but its more useful in a component
Jan 6 '06 #6
I appreciate all the information, i will take time and learn...
Jan 7 '06 #7
color does make a difference in graphs
Jan 7 '06 #8

"t" <la**@night.z z> wrote in message news:42******** *****@individua l.net...
Slim wrote:
"Jose M Hernandez" <Jose M He*******@discu ssions.microsof t.com> wrote in
message news:C9******** *************** ***********@mic rosoft.com...
Does anybody know of techniques (or websites) where a graph is generated
based on data of an array?

Any advice on graphs and ASP is greatly appreciated...


Here's one example not using any component, just pure asp and html:
http://www.u229.no/stuff/HTMLGraph/

t


actually its a component
"Set oChart1 = New cSingleVertical Chart"
Jan 7 '06 #9
t
Slim wrote:
Here's one example not using any component, just pure asp and html:
http://www.u229.no/stuff/HTMLGraph/

t

actually its a component
"Set oChart1 = New cSingleVertical Chart"


No, it isn't. This is a reference to a vbscript class.

t
Jan 7 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3145
by: Mark Fenbers | last post by:
I am investigating Python for the sake of ultimately generating hydrographs (such as this: http://ahps.erh.noaa.gov/iln/ahps/RiverDat/gifs/prgo1.png) on-the-fly from a web server cluster. I have not used Python previously and do not yet know if Python is very useful for this or if I am wasting my time. Quite frankly, I am a little bewildered. Not only is there Python, but there are many extention modules which cloud up my view as to...
9
7075
by: rhmd | last post by:
I need to create image files (eg bmp or jpeg) of xy scatter graphs (i.e., graphs in which markers denote individual points; the markers need to be small polygons of various sizes, shapes, colors, shadings, etc. and there are thousands on them on each graph). Have been using MS Excel, but its limitations are unbelievable (only whole number sizes, no way around a 56 color palette, only low quality jpeg files so that when I publish the...
3
3761
by: mscir | last post by:
I'm trying to find thorough documentation for creating graphs using serverside Excel from ASP. Any book recommendations? A well-documented COM wrapper would be nice if it allowed us to create may different types of graph, e.g. Wind Rose (for wind direction), thermometer, as well as standard pie, line, bar charts. I've found a few examples of charting code on websites and at MS, but none of them contain a thorough explanation, and our...
16
11883
by: David Lauberts | last post by:
Hi Wonder if someone has some words of wisdom. I have a access 2002 form that contains 2 graph objects that overlay each other and would like to export them as a JPEG to use in a presentation. I can do this individually for each graph but this does not help me as I need both on the same JPEG. I thought I would try an export the form that contains both but I am having trouble. (My VBA is self taught and a little knowledge is...
3
3782
by: Scott Dabot | last post by:
I am trying to write a program that uses graphs and I have this algorithm for the Depth First Search. //Input: Graph G=(V, E) //Output Graph G with its vertices marked with consecutive integers in //the order they've been first encountered by the DFS traversal mark //each vertex in V with 0 as a mark of being "unvisited" count<--0
4
15587
by: Coskun Cavusoglu | last post by:
Hi I need to build something that works like the following example http://www.realestateabc.com/calc_v22/calculator.html How can can I do this by using c# and web forms. It will be a part of a web based project so it has to work on the web. And the important is as the user slides the control the graph will change itself. How can I get c# to draw a graph on a website depending on the slide controls postion. thanks coskunc
0
372
by: Bruce Schechter | last post by:
I need to generate a series of line charts dynamically from ADO.NET data in an ASP.NET application. I've read several articles about using GDI+ to render graphs into a bitmap image and then to place those images within an ..aspx page. If necessary, I'll do all the hand-coding in that way. But I'd rather not. :) On the contrary, I'm posting here to see if anyone can recommend either (1) a readily available custom control to handle...
2
1705
by: robert.q.johnson | last post by:
Help. I am trying to create a web page in C# to display two rows of data with bar graphs (an image 1px). I get the max value of the row and use the following formula to size the height of the image, but the bar graphs are not sizing correctly. Can anyone provide me with a solution or any ideas. rowValue / maxRowValue * maxBarHeight
4
32085
prometheuzz
by: prometheuzz | last post by:
Hello (Java) enthusiasts, In this article I’d like to tell you a little bit about graphs and how you can search a graph using the BFS (breadth first search) algorithm. I’ll address, and hopefully answer, the following questions: • what is a graph? • how can a graph be represented as an ADT? • how can we search/walk through a graph using the BFS algorithm?
0
9687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9541
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10251
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10228
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.