Page 1 of 1

Colour issue in v2010.02.20202

Posted: Wed Apr 20, 2011 2:47 pm
by 16559011
Hi,

We have an issue with TeeChart where in Delphi XE the color of one particular series is not correct, but in Delphi 2006 it is.
We ordered v2010.02.20202 two weeks ago through DSA in The Netherlands.

One of the series should be red, but it becomes blueish in the app. At design time it is red.
See attachment for how it looks on the screen: on the left, the Delphi IDE, on the right the running app.

When compiling and building the same app in Delphi 2006, everything is fine: at run-time the series displays in a nice bright red colour :)

Our source code does not change anything in the series: it just fills the ChartClientDataSet with fresh chart data using the code block below.

How can we get this problem resolved?

Code: Select all

procedure TMainForm.FillFromDataSet(ADataSet: TDataSet; Title : string; SubTitle: string);
  procedure FillFromDataSetPrimitive(SourceDataSet: TDataSet; TargetDataSet: TDataSet);
  var
    Index: Integer;
    FieldName: string;
    Field: TField;
  begin
    SourceDataSet.Open;
    SourceDataSet.First;
    while not SourceDataSet.Eof do
    begin
      TargetDataSet.Append;
      try
        for Index := 0 to SourceDataSet.FieldCount-1 do
        begin
          FieldName := SourceDataSet.Fields[Index].FieldName;
          Field := TargetDataSet.FindField(FieldName);
          if Assigned(Field) then
            Field.Value := SourceDataSet.Fields[Index].Value;
          Field := TargetDataSet.FindField('LINE');
          if Assigned(Field) then
            Field.AsInteger := TargetDataSet.RecordCount;
        end;
      finally
        TargetDataSet.Post;
      end;
      SourceDataSet.Next;
    end;
  end;
var
{$WARN UNSAFE_TYPE OFF}
  Bookmark: TBookmark;
{$WARN UNSAFE_TYPE ON}
begin
  ChartClientDataSet.DisableControls;
  try
    if ChartClientDataSet.Active then
    begin
      ChartClientDataSet.Close;
      ChartClientDataSet.CreateDataSet;
    end;

    ADataSet.DisableControls;
    try
{$WARN UNSAFE_TYPE OFF}
      Bookmark := ADataSet.GetBookmark;
{$WARN UNSAFE_TYPE ON}
      try
        FillFromDataSetPrimitive(ADataSet, ChartClientDataSet);
{$WARN UNSAFE_TYPE OFF}
        ADataSet.GotoBookmark(Bookmark);
{$WARN UNSAFE_TYPE ON}
      finally
{$WARN UNSAFE_TYPE OFF}
        ADataSet.FreeBookmark(Bookmark);
{$WARN UNSAFE_TYPE ON}
      end;
    finally
      ADataSet.EnableControls;
    end;
  finally
    ChartClientDataSet.EnableControls;
  end;

  BalancedScoreCardDBChart.Title.Text.Clear;
  BalancedScoreCardDBChart.Title.Text.Append(Title);
  BalancedScoreCardDBChart.SubTitle.Text.Clear;
  BalancedScoreCardDBChart.SubTitle.Text.Append(SubTitle);
  BalancedScoreCardDBChart.RefreshData;
  BalancedScoreCardDBChart.Align := alClient;
  Panel_Graphs.Align             := alClient;
  Panel_Graphs.Visible           := true;
end;
Kind regards,

Arno Verhoeven
Chromalloy Holland
Siriusstraat 55
Tilburg, 5015BT
The Netherlands
T +31 135 328 493
F +31 135 432 833
http://www.chromalloy.com

Re: Colour issue in v2010.02.20202

Posted: Thu Apr 21, 2011 8:29 am
by 9350556
Hi Arno,

Please take a look at my post 2 bugs: Series.Clicked() & font rendering http://www.teechart.net/support/viewtop ... =3&t=12283
Try to explicitly set the color to clRed and see what happens then.

Bert

Re: Colour issue in v2010.02.20202

Posted: Wed Jun 01, 2011 12:13 pm
by yeray
Hello,

Excuse me for the delayed reply here. In fact I looked at it and I added it to the defect list on 20th April but for some reason I forgot to answer here. I'd like to apologize for that.

When I looked at it I found it seems to be a broken compatibility with the default color palette in v2010. So I added it to the wish list to be revised asap (TV52015546).

Re: Colour issue in v2010.02.20202

Posted: Fri Jul 15, 2011 11:14 am
by 16457834
I had just found the same problem in v2011, installed in Delphi 2007 in the last few days. Design-time colour settings are ignored and so to get the colours I want I have to set them at run-time. Version is Pro 2011.03.30407 Win32.

Re: Colour issue in v2010.02.20202

Posted: Tue Jul 19, 2011 9:25 am
by yeray
Hello,

I'm afraid it hasn't been revised yet. I recommend you to be aware at the following channels for new release announcements and what's implemented on them:
- Support forum.
- RSS news feed
- Twitter
- Facebook