Board index » delphi » Labels on TeeChart XY points only

Labels on TeeChart XY points only


2005-03-09 11:18:06 AM
delphi3
Using a TeeChart point graph, how do I put labels on the points in the chart
without the labels appearing on the X-axis?
My code looks like this
for i:=0 to 100 do
Series1.AddXY(X[i],Y[i],Labels[i]);
The Labels[i] appear in the correct coordinate spot (X[i],Y[i]) in the
chart; but they also appear on the abcissa position on the x-axis. I just
want the x-axis without the labels on it.
How do I do that?
Thank you very much in advance.
JS
 
 

Re:Labels on TeeChart XY points only

Hi JS,
For hidding the axis labels you have to disable them and make series marks
visible to show the labels at the X,Y point:
Chart1.BottomAxis.Labels:=false;
Series1.Marks.Visible:=true;
You can also implement the Series OnGetMarkText event to customize the marks
contents.
--
Best Regards,
Narcís Calvet
support.steema.com
"Important note: If you are a TeeChart registered customer, please post your
support questions at Steema's Support monitored Forums for customers:
support.steema.com for a prompter reply."
"J Smith" <XXXX@XXXXX.COM>writes
Quote
Using a TeeChart point graph, how do I put labels on the points in the
chart
without the labels appearing on the X-axis?

My code looks like this

for i:=0 to 100 do
Series1.AddXY(X[i],Y[i],Labels[i]);

The Labels[i] appear in the correct coordinate spot (X[i],Y[i]) in the
chart; but they also appear on the abcissa position on the x-axis. I just
want the x-axis without the labels on it.

How do I do that?

Thank you very much in advance.

JS


 

Re:Labels on TeeChart XY points only

Thanks for the reply! All I want to do is have a plain XY scatterplot,
where the points are given by (x,y) coordinates, a label is put on each
point to identify it, and the axes of the scatterplot just have a regular
numerical scale. How do I do that?
For example, the x-axis ranges from 50 to 100 (in kilograms), the y-axis
from 140 to 210 (in centimeters), and the points have initials of
individuals. The initials appear on their respective points on the graph,
not anywhere on the axes. Thus one can examine the axes to determine the
x,y coordinates of the points.
Thanks again,
JS
"Narcís Calvet" <XXXX@XXXXX.COM>writes
Quote
Hi JS,

For hidding the axis labels you have to disable them and make series marks
visible to show the labels at the X,Y point:

Chart1.BottomAxis.Labels:=false;
Series1.Marks.Visible:=true;

You can also implement the Series OnGetMarkText event to customize the
marks
contents.

--
Best Regards,

Narcís Calvet
support.steema.com

"Important note: If you are a TeeChart registered customer, please post
your
support questions at Steema's Support monitored Forums for customers:
support.steema.com for a prompter reply."



"J Smith" <XXXX@XXXXX.COM>writes
news:422e6af3$XXXX@XXXXX.COM...
>Using a TeeChart point graph, how do I put labels on the points in the
chart
>without the labels appearing on the X-axis?
>
>My code looks like this
>
>for i:=0 to 100 do
>Series1.AddXY(X[i],Y[i],Labels[i]);
>
>The Labels[i] appear in the correct coordinate spot (X[i],Y[i]) in the
>chart; but they also appear on the abcissa position on the x-axis. I
just
>want the x-axis without the labels on it.
>
>How do I do that?
>
>Thank you very much in advance.
>
>JS
>
>


 

Re:Labels on TeeChart XY points only

Hi JS,
According to the example you suggested you can do something like:
procedure TForm1.FormCreate(Sender: TObject);
begin
With Series1 do
begin
AddXY(70,175,'JP',clTeeColor);
AddXY(60,155,'IG',clTeeColor);
AddXY(98,190,'XR',clTeeColor);
AddXY(58,172,'BS',clTeeColor);
AddXY(63,166,'JM',clTeeColor);
Marks.Visible:=true;
end;
With Chart1.BottomAxis do
begin
SetMinMax(50,100);
LabelStyle:=talValue;
Increment:=5;
Title.Caption:='Weight (Kgs.)';
end;
With Chart1.LeftAxis do
begin
SetMinMax(140,210);
Title.Caption:='Height (Cms.)';
end;
end;
--
Best Regards,
Narcís Calvet
support.steema.com
"Important note: If you are a TeeChart registered customer, please post your
support questions at Steema's Support monitored Forums for customers:
support.steema.com for a prompter reply."
"J Smith" <XXXX@XXXXX.COM>writes
Quote
Thanks for the reply! All I want to do is have a plain XY scatterplot,
where the points are given by (x,y) coordinates, a label is put on each
point to identify it, and the axes of the scatterplot just have a regular
numerical scale. How do I do that?

For example, the x-axis ranges from 50 to 100 (in kilograms), the y-axis
from 140 to 210 (in centimeters), and the points have initials of
individuals. The initials appear on their respective points on the graph,
not anywhere on the axes. Thus one can examine the axes to determine the
x,y coordinates of the points.

Thanks again,

JS

"Narcís Calvet" <XXXX@XXXXX.COM>writes
news:422eb59f$XXXX@XXXXX.COM...
>Hi JS,
>
>For hidding the axis labels you have to disable them and make series
marks
>visible to show the labels at the X,Y point:
>
>Chart1.BottomAxis.Labels:=false;
>Series1.Marks.Visible:=true;
>
>You can also implement the Series OnGetMarkText event to customize the
marks
>contents.
>
>--
>Best Regards,
>
>Narcís Calvet
>support.steema.com
>
>"Important note: If you are a TeeChart registered customer, please post
your
>support questions at Steema's Support monitored Forums for customers:
>support.steema.com for a prompter reply."
>
>
>
>"J Smith" <XXXX@XXXXX.COM>writes
>news:422e6af3$XXXX@XXXXX.COM...
>>Using a TeeChart point graph, how do I put labels on the points in the
>chart
>>without the labels appearing on the X-axis?
>>
>>My code looks like this
>>
>>for i:=0 to 100 do
>>Series1.AddXY(X[i],Y[i],Labels[i]);
>>
>>The Labels[i] appear in the correct coordinate spot (X[i],Y[i]) in the
>>chart; but they also appear on the abcissa position on the x-axis. I
just
>>want the x-axis without the labels on it.
>>
>>How do I do that?
>>
>>Thank you very much in advance.
>>
>>JS
>>
>>
>
>


 

Re:Labels on TeeChart XY points only

Works like a charm! Thank you!
"Narcís Calvet" <XXXX@XXXXX.COM>writes
Quote
Hi JS,

According to the example you suggested you can do something like:

procedure TForm1.FormCreate(Sender: TObject);
begin
With Series1 do
begin
AddXY(70,175,'JP',clTeeColor);
AddXY(60,155,'IG',clTeeColor);
AddXY(98,190,'XR',clTeeColor);
AddXY(58,172,'BS',clTeeColor);
AddXY(63,166,'JM',clTeeColor);

Marks.Visible:=true;
end;

With Chart1.BottomAxis do
begin
SetMinMax(50,100);
LabelStyle:=talValue;
Increment:=5;
Title.Caption:='Weight (Kgs.)';
end;

With Chart1.LeftAxis do
begin
SetMinMax(140,210);
Title.Caption:='Height (Cms.)';
end;
end;


--
Best Regards,

Narcís Calvet
support.steema.com

"Important note: If you are a TeeChart registered customer, please post
your
support questions at Steema's Support monitored Forums for customers:
support.steema.com for a prompter reply."



"J Smith" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>Thanks for the reply! All I want to do is have a plain XY scatterplot,
>where the points are given by (x,y) coordinates, a label is put on each
>point to identify it, and the axes of the scatterplot just have a
regular
>numerical scale. How do I do that?
>
>For example, the x-axis ranges from 50 to 100 (in kilograms), the y-axis
>from 140 to 210 (in centimeters), and the points have initials of
>individuals. The initials appear on their respective points on the
graph,
>not anywhere on the axes. Thus one can examine the axes to determine
the
>x,y coordinates of the points.
>
>Thanks again,
>
>JS
>
>"Narcís Calvet" <XXXX@XXXXX.COM>writes
>news:422eb59f$XXXX@XXXXX.COM...
>>Hi JS,
>>
>>For hidding the axis labels you have to disable them and make series
marks
>>visible to show the labels at the X,Y point:
>>
>>Chart1.BottomAxis.Labels:=false;
>>Series1.Marks.Visible:=true;
>>
>>You can also implement the Series OnGetMarkText event to customize the
>marks
>>contents.
>>
>>--
>>Best Regards,
>>
>>Narcís Calvet
>>support.steema.com
>>
>>"Important note: If you are a TeeChart registered customer, please
post
>your
>>support questions at Steema's Support monitored Forums for customers:
>>support.steema.com for a prompter reply."
>>
>>
>>
>>"J Smith" <XXXX@XXXXX.COM>writes
>>news:422e6af3$XXXX@XXXXX.COM...
>>>Using a TeeChart point graph, how do I put labels on the points in
the
>>chart
>>>without the labels appearing on the X-axis?
>>>
>>>My code looks like this
>>>
>>>for i:=0 to 100 do
>>>Series1.AddXY(X[i],Y[i],Labels[i]);
>>>
>>>The Labels[i] appear in the correct coordinate spot (X[i],Y[i]) in
the
>>>chart; but they also appear on the abcissa position on the x-axis.
I
>just
>>>want the x-axis without the labels on it.
>>>
>>>How do I do that?
>>>
>>>Thank you very much in advance.
>>>
>>>JS
>>>
>>>
>>
>>
>
>