在 C++ Builder 中获取图表下的系列索引

问题描述 投票:0回答:0

也许这是一个愚蠢的问题......但我有一个包含许多线条系列的 Tchart,我需要知道用户点击了哪个系列。 Delphi 版本(如下)中的 cod 不起作用,我收到一条错误消息,因为

Chart1[seriesIndex]
与 Chart 不兼容。或者,使用
Chart1->SeriesList[seriesIndex]
没有方法 Clicked(X,Y)。 我想做什么:

int index, valorindex;

for(int i=0; i < Chart3->SeriesCount(); i++){
      index = Chart3->SeriesList[i]->Clicked(X,Y);  <-- here is my problem. Chart3[i]->Clicked(X,Y); also returns error
          if (index != -1){
            }
   }

原始代码在 stackoverflow 上发布(单击 TChart 时获取光标下的系列索引)。 我正在使用 Borland C++ Community Edition 10.4

谢谢

获得点击图表的系列索引的替代方法是什么?

c++ indexing series vcl
© www.soinside.com 2019 - 2024. All rights reserved.