Page 1 of 1

I give up!!!

Posted: Mon Feb 07, 2011 6:30 am
by 10046032
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

Re: I give up!!!

Posted: Mon Feb 07, 2011 8:15 am
by narcis
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.

Re: I give up!!!

Posted: Mon Feb 07, 2011 11:03 am
by 10046032
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

Re: I give up!!!

Posted: Thu Feb 10, 2011 4:15 pm
by yeray
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.

Re: I give up!!!

Posted: Fri Feb 11, 2011 5:59 am
by 10046032
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

Re: I give up!!!

Posted: Mon Feb 14, 2011 2:07 pm
by yeray
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 580 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);

Re: I give up!!!

Posted: Mon Feb 21, 2011 8:58 am
by yeray
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.