>ok, I give up. I can't get this part to run. It fails in the
>"SeriesCollection(1).ApplyDataLabels.Type=3"
>saying it does not evaluate to an object.
>All I want to do is to show percentage in the data labels.
>what am I missing here?
>
>
>WITH oBook
>.ActiveChart.SeriesCollection(1).Select
>.ActiveChart.SeriesCollection(1).ApplyDataLabels.Type=3
>.ActiveChart.ChartTitle.SELECT
>.ActiveChart.ChartTitle.AutoScaleFont = .T.
>.ActiveChart.ChartTitle.FONT.NAME = "Arial"
>.ActiveChart.ChartTitle.FONT.FontStyle = "Bold"
>.ActiveChart.ChartTitle.FONT.SIZE = 36
>ENDWITH
Edgar,
I thought we resolved this before, or it wasn't you ? :)
ApplyDataLabels is a method not an object and Type is parameter name of it not a property. In VFP you can't use named parameters but positional.
ApplyDataLabels syntax :
expression.ApplyDataLabels(Type, LegendKey, AutoText, HasLeaderLines)
expression Required. An expression that returns a Chart, Point, or Series object.
All parameters are optional. If you omit anyone it uses the default. ie: If a method has 7 parameters and you only want to define 2nd and 4th :
..SomeMethod(,Par2,,Par4)
.ActiveChart.SeriesCollection(1).ApplyDataLabels(3)
However this call might still fail if type-3 is unavailable for the chart type (percent labels is only available for pie and doughnut charts).
Cetin