Valber Custódio
Valber Custódio

Reputation: 23

TeeChart VCL - Add Marks

I'm trying to create a aditional mark from TDonutSeries at runtime. I have used this source code below:

   with Series1.Marks.Children.Add do
   begin
      Shape.Font.Size:= 10;
      Shape.ShapeStyle:= fosRectangle;
      Shape.Style:= smsPercent;
   end;

In this line

Shape.Style = smsPercent;

I received this error: E2003 Undeclared identifier: 'style'

Is there any way to set the style for the specific mark item or I need to use a specific unit?

Upvotes: 2

Views: 875

Answers (2)

Yeray
Yeray

Reputation: 5039

You can cast to TSeriesMarkShape to access the Style property. Ie:

  with Series1.Marks.Children.Add do
  begin
    Shape.Font.Size:= 10;
    Shape.ShapeStyle:= fosRectangle;
    TSeriesMarkShape(Shape).Style:= smsPercent;
  end;

Upvotes: 0

MBo
MBo

Reputation: 80325

There is no Style property for TTextShape object. But you can use OnGetMarkText event to output mark labels in own custom format.

Upvotes: 1

Related Questions