bubble labeling w/delphi

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
kualoa1
Newbie
Newbie
Posts: 27
Joined: Fri Nov 21, 2008 12:00 am

bubble labeling w/delphi

Post by kualoa1 » Sun Nov 23, 2008 1:49 pm

1) how to add a label to bubble if label field name is "NAME"?

Code: Select all

with dbf1 do begin
 dbffilename:=ExtractFilePath(Application.ExeName) + 'selected.dbf';
 active:=true;
  Chart1.View3D:=false;
 Series1:=TBubbleSeries.Create(self);
 Chart1.AddSeries(Series1);
  for i := 0 to 15 do
  begin
    name:=getcfield('name');
    x:=i;
    y:=getrealfield('y'); 
    radius:=0.001*getrealfield('x'); 
    Series1.addbubble(
    x,y,radius,inttostr(i));
    skip(1);
  end;
 end;
2) how to enable click on a bubble to show "name" value?

Thank you.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Hi!

Post by Sandra » Mon Nov 24, 2008 9:40 am

Hi! kualoa1

You just need to use AddBubble method override which adds a label for each bubble, which you already do. For example:

Code: Select all

  Series1.AddBubble(X,Y,Radius,YourLabelString);
Then you may also need to set series marks visible:

Code: Select all

  Series1.Marks.Visible:=true;


2)

if you want bubble show "name" value when clik the bubble you need to add Mark Tips that you can find at the Chart editor in the "Tools" tab.Alse can find some exemples in new Features Demo.

Sandra

Hope this helps!

Sandra

Post Reply