Drawing Chart is blank

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
TestAlways
Advanced
Posts: 228
Joined: Tue Aug 28, 2007 12:00 am
Location: Oregon, USA

Drawing Chart is blank

Post by TestAlways » Tue Jan 31, 2012 5:52 pm

In previous versions, I used Method 1 below without fail. But in moving to the latest version, it doesn't work. I did some testing and Method 2 works fine:

Code: Select all

    //Method 1    
    lChart.Draw(aRG.Bitmap.Canvas, lRect);
    CodeSite.Send('Batch Gap Chart', aRG.Bitmap);  //  <--- this is blank

    //Method 2
    lBmp := lChart.TeeCreateBitmap(clWhite, lRect);
    try
      aRG.Bitmap.Assign(lBmp);
      CodeSite.Send('Chart Bitmap', lBmp);
    finally
      lBmp.Free;
    end;
I implemented Method 1 in a demo application and it worked fine. Any reason it might not be working?

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Drawing Chart is blank

Post by Yeray » Wed Feb 01, 2012 12:11 pm

Hi Ed,

I'm trying the following in a new simple application with just a chart and two TImage in the form, and everything works as expected in the actual version, doesn't it for you?

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.AddSeries(TBarSeries).FillSampleValues();

  Chart1.Draw(Image1.Canvas, Chart1.ClientRect);
  Image2.Picture.Bitmap.Assign(Chart1.TeeCreateBitmap(clWhite, Chart1.ClientRect));
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

TestAlways
Advanced
Posts: 228
Joined: Tue Aug 28, 2007 12:00 am
Location: Oregon, USA

Re: Drawing Chart is blank

Post by TestAlways » Wed Feb 01, 2012 4:28 pm

It works in my demo, but it did not work in my application. I cannot tell you why.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Drawing Chart is blank

Post by Yeray » Thu Feb 02, 2012 10:04 am

Hi Ed,

There were some changes in the drawing process in the last releases:
http://www.teechart.net/support/viewtop ... 438#p49438

So I wouldn't discard the possibility that some related functions may have been affected.
If you find an easy way to reproduce it consistently so we can reproduce, debug,... it here, we'll be pleased to take a deeper look at it.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply