Hi, I've the problem with data array generated for query. The graphic include only first record, not all records. Why? This is the code in the my asp page: -
<%@ language="vbscript" %>
-
<!--#include file="../Connections/dicomp.asp" -->
-
<%
-
Dim oConn, oRs
-
set oConn= Server.CreateObject ("ADODB.Connection")
-
Set oRs= Server.CreateObject("ADODB.Recordset")
-
-
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("dicomp.mdb")
-
-
'oRs.open "Select conteggio,catgramm From sommacat order by catgramm asc", oConn
-
'oRs.open "SELECT Sum(Conteggio) AS SommaDiConteggio, catgramm FROM conteggiocat GROUP BY catgramm ORDER BY catgramm", oConn
-
oRs.open "SELECT catgramm,sum(conteggio) as sommaconteggio FROM conteggiocat GROUP BY catgramm ORDER BY catgramm", oConn
-
-
set cd = CreateObject("ChartDirector.API")
-
'------------------------------------------
-
if not oRs.EOF then
-
do while not oRs.EOF
-
data = data&","&oRs("sommaconteggio")
-
labels = labels &","& oRs("catgramm")
-
oRs.MoveNext
-
loop
-
end if
-
-
Arraydata = Split(right(data,len(data)-1), ",",-1,1)
-
Arraylabels = Split(right(labels,len(labels)-1), ",",-1,1)
-
-
for i = 0 to ubound(Arraydata)
-
data = Array(Arraydata(i))',Arraydata(1)',Arraydata(2),Arraydata(3),Arraydata(4))
-
next
-
-
for i = 0 to Ubound(Arraylabels)
-
labels = Array(Arraylabels(i))',Arraylabels(1),Arraylabels(2),Arraylabels(3),Arraylabels(4))
-
next
-
-
' Create a PieChart object of size 560 x 270 pixels, with a golden background and a 1
-
' pixel 3D border
-
Set c = cd.PieChart(560, 270, cd.goldColor(), -1, 1)
-
-
' Add a title box using 15 pts Times Bold Italic font and metallic pink background
-
' color
-
Call c.addTitle("Grafico delle Categorie Grammaticali", "timesbi.ttf", 15).setBackground( _
-
cd.metalColor(&Hff9999))
-
-
' Set the center of the pie at (280, 135) and the radius to 110 pixels
-
Call c.setPieSize(280, 135, 110)
-
-
' Draw the pie in 3D with 20 pixels 3D depth
-
Call c.set3D(20)
-
-
' Use the side label layout method
-
Call c.setLabelLayout(cd.SideLayout)
-
-
' Set the label box background color the same as the sector color, with glass effect,
-
' and with 5 pixels rounded corners
-
Set t = c.setLabelStyle()
-
Call t.setBackground(cd.SameAsMainColor, cd.Transparent, cd.glassEffect())
-
Call t.setRoundedCorners(5)
-
-
' Set the border color of the sector the same color as the fill color. Set the line
-
' color of the join line to black (0x0)
-
Call c.setLineColor(cd.SameAsMainColor, &H000000)
-
-
' Set the start angle to 135 degrees may improve layout when there are many small
-
' sectors at the end of the data array (that is, data sorted in descending order). It
-
' is because this makes the small sectors position near the horizontal axis, where
-
' the text label has the least tendency to overlap. For data sorted in ascending
-
' order, a start angle of 45 degrees can be used instead.
-
Call c.setStartAngle(135)
-
-
' Set the pie data and the pie labels
-
Call c.setData(data, labels)
-
-
' output the chart
-
Response.ContentType = "image/png"
-
Response.BinaryWrite c.makeChart2(cd.PNG)
-
Response.End
-
-
Set c = nothing
-
-
Set cd = nothing
-
%>
-
tks very very much
F
1 1517 jhardman 3,406
Recognized Expert Specialist
The two "for...next " loops starting on lines 27 and 31 are looping and overwriting, rather than appending data.
Jared
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: MMMMM |
last post by:
Hmmm, my array seems to be emptying itself for no reason. I just want to grab every form element posted to the page into an
appropriately sized array... What is going on here?
dim arrShort()
Elements = 0
dim frm
for each frm in Request.Form
Elements = Elements + 1
|
by: David Lozzi |
last post by:
Howdy,
I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders!
Now I am making a public function that will take the path of the uploaded image, and resize it with the provided dimensions. My function is below. The current function is returning an error when run from the upload function: A generic error occurred in GDI+. Not sure what exactly that means. From what...
|
by: JoeC |
last post by:
I am trying to write a graphic library. Yes, I know that it is byoined
the scope of this group but I broke the file down to reading a text
file of numbers. The problem I am having is that the program is not
printing the same numbers that are in the file
Here is my code:
#include<windows.h>
#include<iostream>
|
by: JoeC |
last post by:
I am still working in my maze game and I am making improvments. The
main sticking problem that I have is passing my graphic library. This
probram uses windows apis but my question has nothing to do with those.
So please dont jump on me for that. I am making this graphics library
and my bitmap data is stored in an array. This library works some time
and when I have to use the copy constructor it dosn't seem to work. I
did my best to...
|
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,...
| |
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |