Page 1 of 1

Problem with point and bubble series in version 7

Posted: Mon Jan 24, 2005 11:13 pm
by 9338344
I have upgraded from vesion 5 to 7 using delphi 6. I am missing X axis labels and ticks in my main application of most charts which using bubble or point series which are created at run time. I have reproduced the effect in a tiny 1 chart application

TForm1 = class(TForm)
Chart1: TChart;
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}
uses
Series;

procedure TForm1.FormShow(Sender: TObject);
var
Series: TpointSeries;
begin
Series:=TPointSeries.Create(Self);
with Series do
begin
AddXY(0.1,34,'Test1',clteeColor);
AddXY(0.23,44,'Test2',clteeColor);
AddXY(0.41,24,'Test3',clteeColor);
AddXY(0.7,39,'Test4',clteeColor);
AddXY(0.91,24,'Test5',clteeColor);
ParentChart:=Chart1;
GetHorizAxis.LabelStyle:= talValue;
end;

This used to work in version Teechart v5.

If I dont use Labelstyle= the x axis labels are shown as "Test1" etc. What am I doing wrong this should be a simple XY graph. The points come out right, the Y axis is correct but the X axis has no labels, ticks, or grid lines.

Posted: Tue Jan 25, 2005 8:42 am
by Pep
Hi,

to show the XLabels you should set the increment to 0.1 (bcos it's less than 1), adding the following line should work fine :

GetHorizAxis.Increment := 0.1;

Posted: Tue Jan 25, 2005 10:00 pm
by 9338344
Why isnt the increment calculated automatically? It is in version 5. It does seem to be in version 7 but only if the increment >1. The data I plot is can have variable ranges depending on which field the user chooses to plot in my application. This means either I have to stick with version 5.02 of teechart which is working correctly or give up using automatic scaling in version 7 and write my own scaling routines to look at the data ranges and calculate nice starting, ending and increment values for my data?