 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
John Guest
|
Posted: Tue Nov 30, 2004 1:41 am Post subject: TeeChart |
|
|
Hi all,
I'm currently modifying a program using delphi 6 TeeChart and met up with some problems.
1)Under Edit chart/axis/scales, is it possible to fix a permanent number of increments for the Y-axis regardless of the values of the series being drawn? Or otherwise is it possible to change the desired increment during run time?
2)Is it possible to display the value at the particular point on the series when we move the cursor over it? Sort of like a showhint.
3)Lastly, I need to modify the program such that I have to label the various series titles all at the same time. Currently, only one title can be displayed at a time using the code shown below:
procedure TFormDisplayGraph.Chart1ClickSeries(Sender: TCustomChart; Series: TChartSeries; ValueIndex: Integer; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
LabelSeriesTitle.Top := y-10;
LabelSeriesTitle.Left:= x;
LabelSeriesTitle.Caption:= ' '+ Series.Title + ' ';
LabelSeriesTitle.Visible:= true;
end;
Is there a way to display all at the same time? Or should I display the titles as the code is drawing the series? the code is shown below:
//show the series and assign the title if TableGraph.FindField(ListSeries[k])<>nil then
begin
Chart1.Series[i*ListSeries.Count+k].Active := True;
if ListMulti[k] = '1' then Chart1.Series[i*ListSeries.Count+k].Title := ListSeries[k] + ' ' +ListYear[i]
Else Chart1.Series[i*ListSeries.Count+k].Title := ListSeries[k]+'('+ ListMulti[k] +') ' + ListYear[i];
if QueryDraw.fieldByName(ListSeries[k]).isNull=true then Chart1.Series[i*ListSeries.Count+k].AddY(0, QueryDraw.FieldByName('DayType').value, clNone)
else Chart1.Series[i*ListSeries.Count+k].AddY(QueryDraw.FieldByName(ListSeries[k]).value * StrToFloat(ListMulti[k]), QueryDraw.FieldByName('DayType').value);
QueryDraw.Next;
end;
end;
Many thanks in advance.
John
|
|
| Back to top |
|
 |
Peter Below (TeamB) Guest
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|