Access Series properties from Script
Hi, i'm creating a chart dynamically from script, so far i have something like this:
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
Throws an runtime error.
Any idea would be appreciated.
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
Try this:
TBarSeries(Chart5.Series[0]).Marks.Visible:=False;