Colour issue in v2010.02.20202

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
averhoeven
Newbie
Newbie
Posts: 1
Joined: Thu Apr 07, 2011 12:00 am

Colour issue in v2010.02.20202

Post by averhoeven » Wed Apr 20, 2011 2:47 pm

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
Attachments
TeeChart v2010.02.20202 Win32 Delphi XP colour issue.png
displays the colour issue: on the left the Delphi IDE, on the right the running app.
TeeChart v2010.02.20202 Win32 Delphi XP colour issue.png (312.31 KiB) Viewed 8404 times

Bert B.
Newbie
Newbie
Posts: 69
Joined: Fri Jun 15, 2007 12:00 am

Re: Colour issue in v2010.02.20202

Post by Bert B. » Thu Apr 21, 2011 8:29 am

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

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

Re: Colour issue in v2010.02.20202

Post by Yeray » Wed Jun 01, 2011 12:13 pm

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).
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

toreba
Newbie
Newbie
Posts: 6
Joined: Wed Nov 10, 2010 12:00 am

Re: Colour issue in v2010.02.20202

Post by toreba » Fri Jul 15, 2011 11:14 am

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.

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

Re: Colour issue in v2010.02.20202

Post by Yeray » Tue Jul 19, 2011 9:25 am

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
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