In IWCompTeeChart.pas (which I believe compiles to make the IWChart compiled component) the following code (and comment) exists. I have
TChart 7 pro. Projects work OK when just using fpicture.assign(tmp).
However, when I follow the suggestion in the comment and change this to do a picture.assign(FChart) I get an exception and a Parent form does not exist error.
So, what is the meaning of the comment below? Is there any advantage to being able to assign FChart instead of a bitmap?
Function TIWChart.RenderHTML(AContext:
TIWBaseHTMLComponentContext):TIWHTMLTag;
var tmp : TBitmap;
begin
if Assigned(FChart) then
with FChart do
begin
FPicture.Bitmap.Width:=Width;
FPicture.Bitmap.Height:=Height;
tmp:=TeeCreateBitmap(Color,Rect(0,0,Width,Height));
try
// For compatibility with TeeChart Standard.
// With TeeChart Pro, simple FPicture.Assign(FChart), no bitmap
needed.
FPicture.Assign(tmp);
finally
tmp.Free;
end;
end;
result:=inherited RenderHTML(AContext);
end;
Intraweb 8 and TChart Pro
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi WCantrall,
To assign a chart why aren't you using the IWChart compiled component? There are examples of its usage included.
To assign a chart why aren't you using the IWChart compiled component? There are examples of its usage included.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
The point is that I am using IWChart. The question has to do with the comments in the code that make up IWChart which suggest that the code should be changed for my environment. That source code was provided with IWChart. I have provided the text of the code and the comment. It presumably comes from Steema. Could someone please explain it.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi WCantrall,
Using the commented code you could improve the performance because the Bitmap wouldn't be calculated twice. For this not to crash you could try creating an invisible form and set it as the parent for FChart that has no parent.
Anyway, we are going to improve this code for future releases.
Using the commented code you could improve the performance because the Bitmap wouldn't be calculated twice. For this not to crash you could try creating an invisible form and set it as the parent for FChart that has no parent.
Anyway, we are going to improve this code for future releases.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |