Delphi-Quellcode:
procedure TPlanung.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
Var
Index : Integer;
procedure GetHint ( aList : TStringList);
begin
with aList do
begin
fChargenName := Names[Index];
Chart1.Hint := Names[Index] + #$0d + Trim(Copy(Strings[Index],16,255));
end;
end;
begin
if fEnableMouseMove Then
begin
Chart1.ShowHint := False;
Chart1.Hint := #$0D;
fChargenName := '';
Index := Series1.GetCursorValueIndex;
if (Index >= 0) and (Index < fChargen.Count) Then
begin
GetHint(fChargen);
fMouseKessel := Trunc(Series1.YValues.Value[Index]);
end
else
begin
Index := Series2.GetCursorValueIndex;
if (Index >= 0) and (Index < fLaufende.Count) Then
GetHint(fLaufende);
end;
if Chart1.Hint <> #$0d Then Chart1.ShowHint := True;
end;
end;
fChargen bzw. fLaufende sind 2 Stringlisten, in denen ich die anzuzeigenden Hints hinterlegt habe