Access Series properties from Script

Hi, i'm creating a chart dynamically from script, so far i have something like this:
      Chart5.AddSeries(csBar);
      Chart5.SeriesData[0].DataSetName:='DatosPivot1';
      Chart5.SeriesData[0].YSource:='DatosPivot1."'+DatosPivot1.Fields[1].FieldName+'"';
      Chart5.SeriesData[0].XSource:='DatosPivot1."'+DatosPivot1.Fields[0].FieldName+'"';                                                              
                                                                                                                                                                                                              
      Chart5.AddSeries(csBar);
      Chart5.SeriesData[1].DataSetName:='DatosPivot1';
      Chart5.SeriesData[1].YSource:='DatosPivot1."'+DatosPivot1.Fields[2].FieldName+'"';          
      Chart5.SeriesData[1].XSource:='DatosPivot1."'+DatosPivot1.Fields[0].FieldName+'"';          
        
      Chart5.AddSeries(csBar);
      Chart5.SeriesData[2].DataSetName:='DatosPivot1';
      Chart5.SeriesData[2].YSource:='DatosPivot1."'+DatosPivot1.Fields[3].FieldName+'"';
      Chart5.SeriesData[2].XSource:='DatosPivot1."'+DatosPivot1.Fields[0].FieldName+'"';

It works well, but i want to access the "Marks" Property of the Series and set the visibility to false; i have no idea how to do it from code
Chart5.Series[0].Marks.Visible:=False;

Throws an runtime error.

Any idea would be appreciated.

Comments

  • edited June 2016
    I'm very late, but maybe it helps anyone.

    Try this:
    TBarSeries(Chart5.Series[0]).Marks.Visible:=False;

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.