Creates an Excel chart in a new worksheet
Usage:
xlsInsertChart (object me, integer chartType, integer x0, integer y0, integer x1, integer y1, integer plotBy, integer legendType, string title )
Parameters:
chartType (integer) - the Excel chart type. Some possible values are:
- 4 - Line Chart
- 5 - Pie Chart
- 15 - Bubble Chart
- 52 - Column Stacked Chart
- 58 - Stacked Bar Chart
- 61 - 3D Stacked Bar Chart
- 69 - Exploded Pie Chart
- -4100 3D Column Chart
- -4101 3D Line Chart
- -4102 - 3D Pie Chart
x0 (integer) - left cell index number for starting cell
y0 (integer) - top cell index number for starting cell
x1 (integer) - left cell index number for ending cell
y1 (integer) - top cell index number for ending cell
plotBy (integer) - 1 to plots the chart using the each row as the series. Any other integer value plots the series by column
legendType (integer). the placement of the legend box, and the possible values are
- 0 - No legend box
- 1 - legend box at left position
- 2 - legend box at top position
- 3 - legend box at right position
- 4 - legend box at bottom position
title (string) - the chart title string. To eliminate a title, pass in parameter of EMPTY.
Returns:
(integer) - The success code
Example:
xtRose = xtra("Rosetta").new( )
xtRose.xlsLaunch( )
xtRose.xlsNewBlank( )
xtRose.xlsSetRange( 1, 1, 2, 5 )
xtRose.xlsInsertTxt( [ ["socks", 20 ], ["gloves", 4 ], ["scarf", 2 ], ["glove", 10 ], ["ear muff", 1 ] ] )
xtRose.xlsInsertChart( 5, 1, 1, 2, 5 , 1, 4, "My winter collection" )
Notes: