TeePreviewPanel and colored chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Mike
Newbie
Newbie
Posts: 6
Joined: Tue Mar 29, 2005 5:00 am

TeePreviewPanel and colored chart

Post by Mike » Fri Jun 27, 2008 6:16 am

Hi guys,

I have a problem with print of colored chart using TeePreviewPanel. I set chart color and assign chart to TeePreview Panel, but default color in Tee PreviewPanel is drawn!

Is it a bug or is there any trick to draw right?

Note: I tried to check this problem in very simply test. I made new empty project, took chart and TeePreviesPanel components and placed them on to the form. I set color of the chart and then assigned chart to TeePreviewPanel. But default color is used on teePreviewPanel.

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jun 30, 2008 10:18 am

Hi Mike,

yes, you're correct, its a bug. I've added it on our defect list and a fix for it will be considered for the next maintenance releases.
In meantime a workaround is to set the Chart color using a gradient, setting the same color for startcolor and endcolor properties. This will make the color to appear into the Chart of the TeePreviewPanel.

Here a sample code :

Code: Select all

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
with Chart1.Gradient do
begin
  StartColor := clred;
  EndColor := clred;
  Visible := true;
end;

TeePreviewPanel1.Panel := Chart1;
TeePreviewPanel1.Refresh;
end;

Post Reply