Page 1 of 1

THighLowSeries Labels

Posted: Thu May 01, 2008 9:30 am
by 9231211
I am adding data to my THighLowSeries with:

Code: Select all

MyHighLowSeries->AddHighLow(X, High, Low, Label);
and at some point later I am wanting to access the labels. For some reason, however, MyHighLowSeries->Labels gives me an empty list.

Am I missing something?

Posted: Fri May 02, 2008 9:24 am
by yeray
Hi jhhd,

I've been able to reproduce the problem and I've added it to the wish list (TV52013025) lo be fixed in further releases.
In the meanwhile, you could force updating the labels with Series1->Labels->Labels as follows:

Code: Select all

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  String mylabel;
  for (int i=0; i < 25; i++) {
   mylabel = "label " + IntToStr(i);
   Series1->AddHighLow(i+1, rand()*100, rand()*100 + 100, mylabel);
   Series1->Labels->Labels[i] = mylabel;
  }
}

Posted: Fri May 02, 2008 9:42 am
by 9231211
OK, thanks. For what I was using the labels for I can make use of the title property (I was setting each label to the same thing anyway).