Teechart - Lines

Hello everybody!

I'm developing a report with chart. I need to change the "line > title" and "active" properties in run time, but when I use the command below I receive an error message:

Chart1.Series(0).Active := False;
Chart1.Series(0).Title := 'my title';

"Project xxx.exe raised exception class Exception with message 'Index required'."

Honestly, I can't find any help about this issue. I'm still researching about this issue at the Internet, but it is a hard work.

Thanks a lot.
Junior

Comments

  • edited 8:49PM
    To change the property "active", I executed the command below:

    Chart1.Series[0].Active := False/True;

    Now, to change the series title, I have no ideia how to do it (yet).
  • gordkgordk St.Catherines On. Canada.
    edited 8:49PM
    Chart1.Series[0].Title := your string
  • edited October 2013
    gordk wrote: »
    Chart1.Series[0].Title := your string

    Hello gordk...

    This command didn't work, I've tried this before. The "Title" property doesn't appear when I press CTRL + SPACE in FR IDE, after "Chart1.Series[0]." command. When I try to run the report, an error message occurs:

    "Project ..... raised excpetion class EVariantTypeCastError with message 'Could not convert variant of type (Null) into type (Null)."

    Thanks.
  • gpigpi
    edited 8:49PM
    TBarSeries(Chart1.Series[0]).Title := 'test';
  • edited 8:49PM
    gpi wrote: »
    TBarSeries(Chart1.Series[0]).Title := 'test';

    It worked!!! Thanks a lot, gpi!

Leave a Comment