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 11:39PM
    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 11:39PM
    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 11:39PM
    TBarSeries(Chart1.Series[0]).Title := 'test';
  • edited 11:39PM
    gpi wrote: »
    TBarSeries(Chart1.Series[0]).Title := 'test';

    It worked!!! Thanks a lot, gpi!

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.