Page 1 of 1

Axis LabelsFont not taking in TeeChart 805

Posted: Thu Jun 25, 2009 1:06 pm
by 9336879
I just upgraded from TeeChart711 to Teechart805 and working for now with Delphi 2006. I have my own chart print preview form in which a hidden chart is attached to a tTeePreviewPanel. I have various controls for adjusting the fonts on various parts of the chart (titles, subtitles, axis, legend, etc.) prior to printing.

After upgrading from TeeChart711 to TeeChart805 changes to the left and bottom axis labels areno longer displayed in the preview panel, although they are set correctly in the chart. Strangely, font changes to the axis titles, and the chart title work just fine.

Any thoughts?

Thanks!

Re: Axis LabelsFont not taking in TeeChart 805

Posted: Fri Jun 26, 2009 9:48 am
by yeray
Hi cheaps,

I tried to reproduce the problem with the following code (pretty the same than Custom Labels demo) and the labels look fine in a TeePreviewPanel linked to the chart:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Chart1[0].Clear;

  for i:=0 to 25 do
    Chart1[0].Add(random*1000);

  Chart1.Axes.Left.Items.Clear;

  with Chart1.Axes.Left do
  begin
    Items.Clear;  // remove all custom labels

    // add custom labels
    Items.Add(900,'Hello').Font.Size:=16;
    Items.Add(600,'Good'#13'Bye').Transparent:=False;
    Items.Add(400);

    with Items.Add(200) do
    begin
      Transparent:=False;
      Transparency:=50;
      Color:=clBlue;
    end;
  end;
end;
Note: Only a chart, a line series and a TeePreviewPanel added at design time.

Could you please send us a simple example project we can run as-is to reproduce the problem here?

Thanks in advance.

Re: Axis LabelsFont not taking in TeeChart 805

Posted: Thu Jul 02, 2009 9:39 pm
by 9336879
Hi again

I tracked down the problem a bit more. I was using a chart that had been copied from another using the Chart.assign routine plus the series.assign routine. That seemed to be what was causing the problem, not so much the preview panel itself.

Are there some best practices on how best to copy one whole chart to another including all axes and series?

Thanks,

Charlie

Re: Axis LabelsFont not taking in TeeChart 805

Posted: Fri Jul 03, 2009 7:50 am
by yeray
Hi Charlie,

Take a look at this topic, where a customer asked for something similar.