[]
        
(Showing Draft Content)

GC.Spread.Sheets.DataCharts.DataChart

Class: DataChart

Sheets.DataCharts.DataChart

Table of contents

Constructors

Methods

Constructors

constructor

new DataChart(sheet, name, x, y, width, height, type)

Represents a datachart.

Parameters

Name Type Description
sheet Worksheet The host sheet of the datachart.
name string The name of the datachart.
x number The x location of the datachart.
y number The y location of the datachart.
width number The width of the datachart.
height number The height of the datachart.
type DataChartType The type of the datachart.

Methods

allowMove

allowMove(value?): any

Gets or sets whether to disable moving the data chart.

Parameters

Name Type Description
value? boolean The setting for whether to disable moving the data chart.

Returns

any

If no value is set, returns the setting for whether to disable moving the data chart; otherwise, returns the data chart.


allowResize

allowResize(value?): any

Gets or sets whether to disable resizing the data chart.

Parameters

Name Type Description
value? boolean The setting for whether to disable resizing the data chart.

Returns

any

If no value is set, returns the setting for whether to disable resizing the data chart; otherwise, returns the data chart.


alt

alt(value?): any

Gets or sets the alternative text of the data chart for screen readers.

Parameters

Name Type Description
value? string The alternative text of the data chart.

Returns

any

The alternative text of the data chart.


canPrint

canPrint(value?): any

Gets or sets whether this data chart is printable.

Parameters

Name Type Description
value? boolean The value that indicates whether this data chart is printable.

Returns

any

If no value is set, returns whether this data chart is printable.


dynamicMove

dynamicMove(value?): any

Gets or sets whether the object moves when hiding or showing, resizing, or moving rows or columns.

Parameters

Name Type Description
value? boolean The value indicates whether the object moves when hiding or showing, resizing, or moving rows or columns.

Returns

any

If no value is set, returns whether this data chart dynamically moves; otherwise, returns the data chart.


dynamicSize

dynamicSize(value?): any

Gets or sets whether the position of the data chart is fixed. When fixedPosition is true, dynamicMove and dynamicSize are disabled.

Parameters

Name Type Description
value? boolean The value indicates whether the position of the data chart is fixed.

Returns

any

If no value is set, returns whether the position of the data chart is fixed; otherwise, returns the data chart.


endColumn

endColumn(value?): any

Gets or sets the end column index of the data chart position.

Parameters

Name Type Description
value? number The end column index of the data chart position.

Returns

any

If no value is set, returns the end column index of the data chart position; otherwise, returns the data chart.


endColumnOffset

endColumnOffset(value?): any

Gets or sets the offset relative to the end column of the data chart.

Parameters

Name Type Description
value? number The offset relative to the end column of the data chart.

Returns

any

If no value is set, returns the offset relative to the end column of the data chart; otherwise, returns the data chart.


endRow

endRow(value?): any

Gets or sets the end row index of the data chart position.

Parameters

Name Type Description
value? number The end row index of the data chart position.

Returns

any

If no value is set, returns the end row index of the data chart position; otherwise, returns the data chart.


endRowOffset

endRowOffset(value?): any

Gets or sets the offset relative to the end row of the data chart.

Parameters

Name Type Description
value? number The offset relative to the end row of the data chart.

Returns

any

If no value is set, returns the offset relative to the end row of the data chart; otherwise, returns the data chart.


getChartConfig

getChartConfig(): IDataChartConfig

get datachart config.

example

var datachart = activeSheet.datacharts.add('datachart1', 250, 20, 480, 300, GC.Spread.Sheets.DataCharts.DataChartType.column);
console.log(datachart.getChartConfig());

Returns

IDataChartConfig

The config of the datachart.


height

height(value?): any

Gets or sets the height of a data chart.

Parameters

Name Type Description
value? number The height of a data chart.

Returns

any

If no value is set, returns the height of a data chart; otherwise, returns the data chart.


isLocked

isLocked(value?): any

Gets or sets whether this data chart is locked.

Parameters

Name Type Description
value? boolean The value that indicates whether this data chart is locked.

Returns

any

If no value is set, returns whether this data chart is locked; otherwise, returns the data chart.


isSelected

isSelected(value?): any

Gets or sets whether this data chart is selected.

Parameters

Name Type Description
value? boolean The value that indicates whether this data chart is selected.

Returns

any

If no value is set, returns whether this data chart is selected; otherwise, returns the data chart.


isVisible

isVisible(value?): any

Gets or sets whether this data chart is visible.

Parameters

Name Type Description
value? boolean The value that indicates whether this data chart is visible.

Returns

any

If no value is set, returns whether this data chart is visible; otherwise, returns the data chart.


name

name(value?): any

Gets the name of the data chart.

Parameters

Name Type Description
value? string The name of the data chart.

Returns

any

If no value is set, returns the name of the data chart; otherwise, returns the data chart.


setChartConfig

setChartConfig(config): void

set datachart config.

example

var datachart = activeSheet.datacharts.add('datachart1', 250, 20, 480, 300, GC.Spread.Sheets.DataCharts.DataChartType.column);
var config = datachart.getChartConfig();
config.plots[0].type = GC.Spread.Sheets.DataCharts.DataChartType.line;
datachart.setChartConfig(config);

Parameters

Name Type Description
config IDataChartConfig The config of the datachart.

Returns

void


startColumn

startColumn(value?): any

Gets or sets the starting column index of the data chart position.

Parameters

Name Type Description
value? number The starting column index of the data chart position.

Returns

any

If no value is set, returns the starting column index of the data chart position; otherwise, returns the data chart.


startColumnOffset

startColumnOffset(value?): any

Gets or sets the offset relative to the start column of the data chart.

Parameters

Name Type Description
value? number The offset relative to the start column of the data chart.

Returns

any

If no value is set, returns the offset relative to the start column of the data chart; otherwise, returns the data chart.


startRow

startRow(value?): any

Gets or sets the starting row index of the data chart position.

Parameters

Name Type Description
value? number The starting row index of the data chart position.

Returns

any

If no value is set, returns the starting row index of the data chart position; otherwise, returns the data chart.


startRowOffset

startRowOffset(value?): any

Gets or sets the offset relative to the start row of the data chart.

Parameters

Name Type Description
value? number The offset relative to the start row of the data chart.

Returns

any

If no value is set, returns the offset relative to the start row of the data chart; otherwise, returns the data chart.


width

width(value?): any

Gets or sets the width of a data chart.

Parameters

Name Type Description
value? number The width of a data chart.

Returns

any

If no value is set, returns the width of a data chart; otherwise, returns the data chart.


x

x(value?): any

Gets or sets the horizontal location of the data chart.

Parameters

Name Type Description
value? number The horizontal location of the data chart.

Returns

any

If no value is set, returns the horizontal location of the data chart; otherwise, returns the data chart.


y

y(value?): any

Gets or sets the vertical location of the data chart.

Parameters

Name Type Description
value? number The vertical location of the data chart.

Returns

any

If no value is set, returns the vertical location of the data chart; otherwise, returns the data chart.