Page 1 of 1
Restrictions for Marks in TFastLineSeries?
Posted: Thu Jul 22, 2010 9:33 am
by 10554786
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
Re: Restrictions for Marks in TFastLineSeries?
Posted: Thu Jul 22, 2010 2:04 pm
by 10554786
Here is a screenshot.
- Debugger shows mark shadow invisible, but it is drawn.
- MarksDrawingError2.png (121.89 KiB) Viewed 8628 times
Re: Restrictions for Marks in TFastLineSeries?
Posted: Fri Jul 23, 2010 8:24 am
by 10554786
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.
Re: Restrictions for Marks in TFastLineSeries?
Posted: Fri Jul 23, 2010 1:42 pm
by yeray
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.
Re: Restrictions for Marks in TFastLineSeries?
Posted: Fri Jul 23, 2010 2:12 pm
by 10554786
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
Re: Restrictions for Marks in TFastLineSeries?
Posted: Fri Jul 23, 2010 2:16 pm
by 10554786
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
Re: Restrictions for Marks in TFastLineSeries?
Posted: Fri Jul 23, 2010 3:59 pm
by yeray
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;
Re: Restrictions for Marks in TFastLineSeries?
Posted: Fri Jul 23, 2010 6:05 pm
by 10554786
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?
Re: Restrictions for Marks in TFastLineSeries?
Posted: Fri Jul 23, 2010 6:48 pm
by 10554786
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.
Re: Restrictions for Marks in TFastLineSeries?
Posted: Mon Jul 26, 2010 3:47 pm
by yeray
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).