I give up!!!

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

I give up!!!

Post by johnnix » Mon Feb 07, 2011 6:30 am

Hello Steema Team,

I really believe that your component is top class but you really have issues with your updates. Actually I am having the idea that you are not updating in the traditional way of "adding" new features or "fixing" bugs, you completely alter the behavior of several functions. I will not get into details as there are a lot of things not working properly for my app using your latest 2010 update e.g. the following code does not work any more with TLineSeries:

Code: Select all

procedure TMyProject.ApplyPlotLineColor(aChart: TChart);
begin
  if aChart.SeriesCount > 0 then
    aChart.Series[0].Pen.Color := PlotLineColor;
end;
Regards

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: I give up!!!

Post by Narcís » Mon Feb 07, 2011 8:15 am

Hi johnnix,

If you look at the release notes you'll see we have fixed some bugs in this area. In 2D you have to use series Color as shown in the code snippet below.

Code: Select all

uses Series;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=False;
  Chart1.AddSeries(TLineSeries.Create(Self)).FillSampleValues;

  if Chart1.SeriesCount > 0 then
    Chart1[0].Color := clLime;
end;
If you think there are other issues not working how they should please don't hesitate to let us know. We will try to help you finding out how to use them or address them.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Re: I give up!!!

Post by johnnix » Mon Feb 07, 2011 11:03 am

Hello,

Thank you for the prompt reply.

1. Release notes refer to a 2D color bug fix which is so general that I could not imagine that my code is no longer valid
2. I am using the following code to place a TChart inside a custom metafile in a certain position. This code now puts the chart way off the provided coordinates:

Code: Select all

  MyChart.CustomChartRect := true;
  MyChart.ChartRect:=TeeRect(30, start_y, 150,
                           start_y+trunc(total_depth*(h-start_y)/total_depth));
  Mychart.DrawToMetaCanvas(canvas, Mychart.ChartRect);
Regards

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

Re: I give up!!!

Post by Yeray » Thu Feb 10, 2011 4:15 pm

Hi johnnix,
johnnix wrote:1. Release notes refer to a 2D color bug fix which is so general that I could not imagine that my code is no longer valid
Looking into the forums I've found the thread where the bug TV52015199 was reported. And TV52014124, that is related to it.
Note that in the release notes we try to resume the bugs in a few words. You can always search for the origin of the tickets or ask us directly, here in the forums.
johnnix wrote:2. I am using the following code to place a TChart inside a custom metafile in a certain position. This code now puts the chart way off the provided coordinates:

Code: Select all

MyChart.CustomChartRect := true;
MyChart.ChartRect:=TeeRect(30, start_y, 150, 
                        start_y+trunc(total_depth*(h-start_y)/total_depth)); 
Mychart.DrawToMetaCanvas(canvas, Mychart.ChartRect);
We've modified the CustomChartRect behaviour some time ago. Now it calculates the space to place the labels and the axes. Maybe that's the reason why it is not drawn where you expected.
If you can arrange a simple example project we can run as-is to reproduce the problem here, we'll be pleased to take a look at it and try to explain how you could make it look better, if possible.
Thanks in advance.
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

johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Re: I give up!!!

Post by johnnix » Fri Feb 11, 2011 5:59 am

Hello,

There is no need to create an example, I will just need information on how to use the function so that I could draw the plot in such a way where the top left point of the Y axis is placed on the point coordinates I provide.

Regards

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

Re: I give up!!!

Post by Yeray » Mon Feb 14, 2011 2:07 pm

Hi johnnix,

I reproduced the problem with the attached project. So I've added it to the defect list to be fixed in future releases (TV52015390).
DrawToMetaCanvas.zip
(1.62 KiB) Downloaded 512 times
It seems that the fix for the bug TV52015163 has broken it. If you are a source code customer, you could search for "TV52015163" into TeeProcs.pas and revert the fix for it. Concretely removing/commenting the line:

Code: Select all

OffsetRect(ChartRect,FChartBounds.Left,FChartBounds.Top);
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

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

Re: I give up!!!

Post by Yeray » Mon Feb 21, 2011 8:58 am

Hi johnnix,

Adding a little condition to the mentioned line in TeeProcs.pas solves both problems. So the following will be in the next maintenance release:

Code: Select all

if FPrinting then OffsetRect(ChartRect,FChartBounds.Left,FChartBounds.Top);
You could try it in the sources you have.
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