前提是:各Series之间存在数据对照关系
i := ValueIndex;
if (i > 0) and (i <= Series_main.count - 1) then
begin
if Series_main.GetHorizAxis = Series1.GetHorizAxis then
begin
if i - (Series_main.Count - Series1.Count) >= 0 then
TextOutStr0 := Series1.Title + '(' + FormatFloat('##0.00',
Series1.YValues[i - (Series_main.Count - Series1.Count)]) + ') ';
if i - (Series_main.Count - Series2.Count) >= 0 then
TextOutStr0 := TextOutStr0 + Series2.Title + '(' + FormatFloat('##0.00',
Series2.YValues[i - Series_main.Count + Series2.Count]) + ') ';
if i - (Series_main.Count - Series3.Count) >= 0 then
TextOutStr0 := TextOutStr0 + Series3.Title + '(' + FormatFloat('##0.00',
Series3.YValues[i - Series_main.Count + Series3.Count]) + ') ';
if i - (Series_main.Count - Series4.Count) >= 0 then
TextOutStr0 := TextOutStr0 + Series4.Title + '(' + FormatFloat('##0.00',
Series4.YValues[i - Series_main.Count + Series4.Count]) + ') ';
if (Chart_Base.ControlCount > 2) {and (length(TextOutStr0) > 0)} then
TLabel(Chart_Base.Controls[0]).Caption := TextOutStr0;
end;
//没有整理,自己研究吧。