<HTML><BODY>
<DIV>have you assigned the series to the chart?</DIV>
<DIV> </DIV>
<DIV>From memory is like :-</DIV>
<DIV> </DIV>
<DIV> mySeries.chart=Chart1;</DIV>
<DIV> </DIV>
<DIV>Somthing like that, but you have to assign the series to a chart any
way.</DIV>
<DIV> </DIV>
<DIV>Jeremy<BR></DIV>
<BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px;
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">-----Original
Message-----<BR>From: "tracey" <tracey@logis.co.nz><BR>To: "'NZ
Borland Developers Group - Delphi List'" <delphi@ns3.123.co.nz><BR>
Date: Thu, 7 Apr 2005 14:17:33 +1200<BR>Subject: RE: [DUG] Teechart 3d
column<BR><BR>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Ok then,
no-one<?xml:namespace prefix = o /><o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p>
</SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">How about this..
can anyone tell me why I am getting this error:<o:p></o:p></SPAN></FONT>
</DIV>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p>
</SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">Access violation at address 00000000. Read of
address 00000000<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">At this line:<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
FChart.SeriesList.Add(aBarSeries[x]);<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p>
</SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">In the following
code???? (the offending line is bold and red text)<o:p></o:p></SPAN></FONT>
</DIV>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p>
</SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
FChart := TChart.Create(nil);<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
FJPEG := TJPEGImage.Create;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Bitmap := nil;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
try<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
{ Initialize Chart Properties }<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
FChart.Color := clWhite;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
FChart.BevelOuter := bvNone;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
FChart.Legend.Visible := False;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
{ Define the Size of the Chart Image }<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Rect.Left := 0;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Rect.Top := 0;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Rect.Right := 450;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Rect.Bottom := 280;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
FChart.View3D := true;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
FChart.Chart3DPercent := 100;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
fchart.DepthAxis.Visible := true;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
FChart.SeriesList.Clear;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
with IBQuery1 do<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
begin<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Close;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
SQL.Clear;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
SQL.Add('Select Name, ConsequenceID from
Consequence');<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Open;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Last;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
SetLength(aConsequence, Recordcount); //consequence array has 5 items<o:p>
</o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
First;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
i := 0;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
while not eof do<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
begin<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
aConsequence[i] := FieldByName('ConsequenceID').AsInteger;<o:p></o:p></SPAN>
</FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
i := succ(i);<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Next;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
end;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Randomize;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Close;<o:p>
</o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
SQL.Clear;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
sQL.Add('Select Name, LikelihoodID from Likelihood');<o:p></o:p></SPAN>
</FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Open;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Last;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
SetLength(aBarSeries, RecordCount); //barseries array has 5 items<o:p></o:p>
</SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
First;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
x := 0;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
while not eof do<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
begin<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
aBarSeries[x]
:= TBarSeries.Create(FChart);<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
aBarSeries[x].ParentChart := FChart;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
aBarSeries[x].MultiBar := mbNone;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
IBQuery2.Close;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
IBQuery2.ParamByName('likelihood').AsInteger
:=<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
FieldByName('LikelihoodID').AsInteger;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
for i := 0 to length(aConsequence) - 1 do<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
begin<o:p></o:p>
</SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
IBQuery2.ParamByName('Consequence').AsInteger :=<o:p></o:p></SPAN></FONT>
</DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
aConsequence[i];<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
IBQuery2.Open;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
aBarSeries[x].Add(IBQuery2.FieldByName('riskcount').AsInteger,<o:p></o:p>
</SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
FieldByName('name').AsString, Random(2147483648));<o:p></o:p></SPAN></FONT>
</DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
IBQuery2.Close;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
end; //for aconsequence length<o:p></o:p></SPAN></FONT>
</DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
<B><I><FONT color=red><SPAN style="FONT-WEIGHT: bold; COLOR:
red; FONT-STYLE: italic">FChart.SeriesList.Add(aBarSeries[x]);</SPAN></FONT>
</I></B> //this line causes violation<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
x := succ(x);<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Next;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
end; //while not eof<o:p></o:p>
</SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
end;
//with IBquery1<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Bitmap := FChart.TeeCreateBitmap(clWhite, Rect);<o:p></o:p></SPAN></FONT>
</DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
FJPEG.Assign(Bitmap);<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
FJPEG.SaveToFile('c:\apache2\icons\riskchart.jpg');<o:p></o:p></SPAN></FONT>
</DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
finally<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
Bitmap.Free;<o:p>
</o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
FChart.Free;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
FJPEG.Free;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">
end;<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p>
</SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p>
</SPAN></FONT></DIV>
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN style="FONT-WEIGHT:
bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">
delphi-bounces@ns3.123.co.nz [mailto:delphi-bounces@ns3.123.co.nz] <B><SPAN
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>tracey<BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Thursday, 7 April 2005 10:44
a.m.<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> '<?xml:namespace
prefix = st1 /><st1:PersonName w:st="on">NZ Borland Developers Group -
<st1:place w:st="on">Delphi</st1:place> List</st1:PersonName>'<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [DUG] Teechart 3d column</SPAN>
</FONT><o:p></o:p></DIV></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Arial">Hi all<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Arial">I am using D6, with teechart v4 VCL to programattically
create charts to display in a web page.<o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Arial">The latest chart I’ve been asked to create is a 3d
column chart. Is anyone here proficient at how to create this style of
graph? <o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV></DIV></BLOCKQUOTE>
</BODY></HTML>