setMsoChartScale: Optimize the scale range and major unit of the axes of a...

Description Usage Arguments Value Author(s) See Also Examples

Description

It is a pipelined wrapper of getMsoChartDims, getMsoChartSeries and getOptScaleUnit, getOptScaleRange to deal with the source data matrix of the mscChart object. By default, the function directly sets the parameters MajorUnit, MinimumScale and MaximumScale of the msoChart, and returns nothing about the optimized scale range or major unit.

Usage

1
setMsoChartScale(oChart, changeScale = TRUE, returnValue = FALSE, ...)

Arguments

oChart

msoChart object (COMIDispatch class)

changeScale

Logical, change the MinimumScale and MaximumScale parameters or not. Default TRUE.

returnValue

Logical, return optimized parameters or not. Default FALSE.

...

Other params.

Value

If returnValue is TRUE, then returns a list list(MajorUnit, ScaleRange). If FALSE, then returns nothing.

Author(s)

Yiying Wang, wangy@aetna.com

See Also

getMsoChartDims getMsoChartSeries getOptScaleUnit getOptScaleRange

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
ppt <- RDCOMClient::COMCreate("Powerpoint.Application")
pres <- ppt$Presentations()$Open(<some ppt file>)
slide <- pres$Slides(2)  # the 2nd slide
shape <- slide$Shapes(3)  # the 3rd shape
if (shape[['HasChart']] == -1) {  # if the shape contains msoChart
    chart <- shape[['Chart']]
    setMsoChartScale(chart)
}

## End(Not run)

madlogos/aseshms documentation built on May 21, 2019, 11:03 a.m.