Bands don't display in grid

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Test Always
Newbie
Newbie
Posts: 14
Joined: Mon Jan 18, 2016 12:00 am

Bands don't display in grid

Post by Test Always » Fri Dec 02, 2016 12:49 am

In the attached (very simplified) demo of a project I am working on, I add bands to the chart when I load the data to the grid. Problem is, I don't know when I can add the bands: when I add the bands, I need value for Chart1.BottomAxis.Maximum. If I add the bands in OnBeforeDrawChart, Maximum is 0, if I add them in OnBeforeDrawSeries, the Maximum value is available but it is too late to show the bands until it is redrawn.

Any suggestions on how to get the attached demo to work?

Thank you,

Ed Dressel
Attachments
Adding Bands.zip
(6.69 KiB) Downloaded 584 times

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

Re: Bands don't display in grid

Post by Yeray » Fri Dec 02, 2016 8:54 am

Hello,

Updating the Bands at OnBeforeDrawAxes seems to work for me:

Code: Select all

procedure TForm2.Chart1BeforeDrawAxes(Sender: TObject);
begin
  UpdateBands;
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

Post Reply