Restrictions for Marks in TFastLineSeries?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
to2
Newbie
Newbie
Posts: 25
Joined: Thu Dec 03, 2009 12:00 am

Restrictions for Marks in TFastLineSeries?

Post by to2 » Thu Jul 22, 2010 9:33 am

Hello,

I set some colors and disabled shadow of marks of a TFastLineSeries. Did it in design time and by code. However, shadow doesn't disappear and colors are unchanged. Disabling Marks->Arrows works. How can I change the other properties?

The debugger shows, that shadow is set to false. Nevertheless it is drawn.

I wonder, if the acceleration of FastLine is responsible for not considering individual settings of marks.

I work with Win7 Pro 32 Bit, CB2010 and TeeChart 8.06.60902 Win32.

Thomas

to2
Newbie
Newbie
Posts: 25
Joined: Thu Dec 03, 2009 12:00 am

Re: Restrictions for Marks in TFastLineSeries?

Post by to2 » Thu Jul 22, 2010 2:04 pm

Here is a screenshot.
MarksDrawingError2.png
Debugger shows mark shadow invisible, but it is drawn.
MarksDrawingError2.png (121.89 KiB) Viewed 8547 times

to2
Newbie
Newbie
Posts: 25
Joined: Thu Dec 03, 2009 12:00 am

Re: Restrictions for Marks in TFastLineSeries?

Post by to2 » Fri Jul 23, 2010 8:24 am

Found a solution:

If I pass text via a label, marks appear as wanted.

Code: Select all

 //ampl_series->Marks->Item[index]->Text->Assign(marks);
 ampl_series->Labels->Labels[index] = marks->Text;
But isn't this a bug? The way of passing text to the marks shouldn't affect its format like the drawing of the shadow.

Question: I saw, that marks' text contain Y-values if the label is empty. I have to remove the unwanted marks' text by GetMarkText. How can I avoid the automatic Y-values in the marks? Marks style is set to smsLabel.

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

Re: Restrictions for Marks in TFastLineSeries?

Post by Yeray » Fri Jul 23, 2010 1:42 pm

Hi Thomas,

I'm not able to reproduce it with the following code:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Chart1.View3D:=false;

  for i:=0 to 5 do
    Series1.Add(i, 'point nº' +IntToStr(i));

  Series1.Marks.Visible:=true;
  Series1.Marks.Shadow.Visible:=false;
  Series1.Marks.Color:=clRed;
end;
Could you please modify it so we can reproduce the problem here? Or could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.

Also note that the latest TeeChart Pro VCL v8 version is v8.07.
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

to2
Newbie
Newbie
Posts: 25
Joined: Thu Dec 03, 2009 12:00 am

Re: Restrictions for Marks in TFastLineSeries?

Post by to2 » Fri Jul 23, 2010 2:12 pm

This example shows the behaviour:

Code: Select all

__fastcall TForm1::TForm1(TComponent* Owner)
 : TForm(Owner)
{
 Chart1->View3D = false;

 for (int i = 0; i < 5; ++i)
   Series1->Add(i, L"point nº" + IntToStr(i));

 Series1->Marks->Visible = true;
 Series1->Marks->Shadow->Visible = false;
 Series1->Marks->Color = clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
 Series1->Marks->Item[1]->Text->SetText(L"Hello");
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button2Click(TObject *Sender)
{
 Series1->Labels->Labels[1] = "Hello";
}
//---------------------------------------------------------------------------
Simply add 2 buttons to your project like i did. If you run Button1Click, marks of the accessed point and the point before change not only their content but also its appearance.

Thomas

to2
Newbie
Newbie
Posts: 25
Joined: Thu Dec 03, 2009 12:00 am

Re: Restrictions for Marks in TFastLineSeries?

Post by to2 » Fri Jul 23, 2010 2:16 pm

Also note that the latest TeeChart Pro VCL v8 version is v8.07.
I do. But in the change list I haven't found something about the reported problem.


Thomas

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

Re: Restrictions for Marks in TFastLineSeries?

Post by Yeray » Fri Jul 23, 2010 3:59 pm

Hi Thomas,

Yes, it seems that if you change a MarkItem.Text, the marks before it loose their format. I've added it to the defect list to be fixed in future releases (TV52015046).
In the meanwhile, a workaround would be to reassign the desired format to all the marks:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
var i: Integer;
begin
  Series1.Marks.Item[3].Text.Text:=('Hello');

  for i:=0 to Series1.Marks.Items.Count-1 do
  begin
    Series1.Marks.Item[i].Color:=Series1.Marks.Color;
    Series1.Marks.Item[i].Shadow.Visible:=Series1.Marks.Shadow.Visible;
  end;
end;
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

to2
Newbie
Newbie
Posts: 25
Joined: Thu Dec 03, 2009 12:00 am

Re: Restrictions for Marks in TFastLineSeries?

Post by to2 » Fri Jul 23, 2010 6:05 pm

I've added it to the defect list to be fixed in future releases (TV52015046)
So I wait for release 8.08.

What about my 2nd question:
Question: I saw, that marks' text contain Y-values if the label is empty. I have to remove the unwanted marks' text by GetMarkText. How can I avoid the automatic Y-values in the marks? Marks style is set to smsLabel?

to2
Newbie
Newbie
Posts: 25
Joined: Thu Dec 03, 2009 12:00 am

Re: Restrictions for Marks in TFastLineSeries?

Post by to2 » Fri Jul 23, 2010 6:48 pm

What about my 2nd question:
I don't have a problem with this behaviour if direkt setting of Marks.Text works. In this case empty marks are not filled.

BTW: What about a new Marks style "smsNone": It means, that Marks.Text is directly filled into and is not set by labels/values/etc.

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

Re: Restrictions for Marks in TFastLineSeries?

Post by Yeray » Mon Jul 26, 2010 3:47 pm

Hi Thomas,

Excuse me, I missed that.
As you've noticed, you can do it with OnGetMarkText and also setting an empty string to the Marks.Item.Text. Anyway, I've added the possibility to have a new TSeriesMarksStyle to the wish list to be implemented in future releases (TV52015050).
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