[]
Sheets.DataCharts.DataChart
• new DataChart(sheet
, name
, x
, y
, width
, height
, type
)
Represents a datachart.
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. |
▸ allowMove(value?
): any
Gets or sets whether to disable moving the data chart.
Name | Type | Description |
---|---|---|
value? |
boolean |
The setting for whether to disable moving the data chart. |
any
If no value is set, returns the setting for whether to disable moving the data chart; otherwise, returns the data chart.
▸ allowResize(value?
): any
Gets or sets whether to disable resizing the data chart.
Name | Type | Description |
---|---|---|
value? |
boolean |
The setting for whether to disable resizing the data chart. |
any
If no value is set, returns the setting for whether to disable resizing the data chart; otherwise, returns the data chart.
▸ alt(value?
): any
Gets or sets the alternative text of the data chart for screen readers.
Name | Type | Description |
---|---|---|
value? |
string |
The alternative text of the data chart. |
any
The alternative text of the data chart.
▸ canPrint(value?
): any
Gets or sets whether this data chart is printable.
Name | Type | Description |
---|---|---|
value? |
boolean |
The value that indicates whether this data chart is printable. |
any
If no value is set, returns whether this data chart is printable.
▸ dynamicMove(value?
): any
Gets or sets whether the object moves when hiding or showing, resizing, or moving rows or columns.
Name | Type | Description |
---|---|---|
value? |
boolean |
The value indicates whether the object moves when hiding or showing, resizing, or moving rows or columns. |
any
If no value is set, returns whether this data chart dynamically moves; otherwise, returns the data chart.
▸ dynamicSize(value?
): any
Gets or sets whether the position of the data chart is fixed. When fixedPosition is true, dynamicMove and dynamicSize are disabled.
Name | Type | Description |
---|---|---|
value? |
boolean |
The value indicates whether the position of the data chart is fixed. |
any
If no value is set, returns whether the position of the data chart is fixed; otherwise, returns the data chart.
▸ endColumn(value?
): any
Gets or sets the end column index of the data chart position.
Name | Type | Description |
---|---|---|
value? |
number |
The end column index of the data chart position. |
any
If no value is set, returns the end column index of the data chart position; otherwise, returns the data chart.
▸ endColumnOffset(value?
): any
Gets or sets the offset relative to the end column of the data chart.
Name | Type | Description |
---|---|---|
value? |
number |
The offset relative to the end column of the data chart. |
any
If no value is set, returns the offset relative to the end column of the data chart; otherwise, returns the data chart.
▸ endRow(value?
): any
Gets or sets the end row index of the data chart position.
Name | Type | Description |
---|---|---|
value? |
number |
The end row index of the data chart position. |
any
If no value is set, returns the end row index of the data chart position; otherwise, returns the data chart.
▸ endRowOffset(value?
): any
Gets or sets the offset relative to the end row of the data chart.
Name | Type | Description |
---|---|---|
value? |
number |
The offset relative to the end row of the data chart. |
any
If no value is set, returns the offset relative to the end row of the data chart; otherwise, returns the data chart.
▸ 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());
The config of the datachart.
▸ height(value?
): any
Gets or sets the height of a data chart.
Name | Type | Description |
---|---|---|
value? |
number |
The height of a data chart. |
any
If no value is set, returns the height of a data chart; otherwise, returns the data chart.
▸ isLocked(value?
): any
Gets or sets whether this data chart is locked.
Name | Type | Description |
---|---|---|
value? |
boolean |
The value that indicates whether this data chart is locked. |
any
If no value is set, returns whether this data chart is locked; otherwise, returns the data chart.
▸ isSelected(value?
): any
Gets or sets whether this data chart is selected.
Name | Type | Description |
---|---|---|
value? |
boolean |
The value that indicates whether this data chart is selected. |
any
If no value is set, returns whether this data chart is selected; otherwise, returns the data chart.
▸ isVisible(value?
): any
Gets or sets whether this data chart is visible.
Name | Type | Description |
---|---|---|
value? |
boolean |
The value that indicates whether this data chart is visible. |
any
If no value is set, returns whether this data chart is visible; otherwise, returns the data chart.
▸ name(value?
): any
Gets the name of the data chart.
Name | Type | Description |
---|---|---|
value? |
string |
The name of the data chart. |
any
If no value is set, returns the name of the data chart; otherwise, returns the data chart.
▸ 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);
Name | Type | Description |
---|---|---|
config |
IDataChartConfig |
The config of the datachart. |
void
▸ startColumn(value?
): any
Gets or sets the starting column index of the data chart position.
Name | Type | Description |
---|---|---|
value? |
number |
The starting column index of the data chart position. |
any
If no value is set, returns the starting column index of the data chart position; otherwise, returns the data chart.
▸ startColumnOffset(value?
): any
Gets or sets the offset relative to the start column of the data chart.
Name | Type | Description |
---|---|---|
value? |
number |
The offset relative to the start column of the data chart. |
any
If no value is set, returns the offset relative to the start column of the data chart; otherwise, returns the data chart.
▸ startRow(value?
): any
Gets or sets the starting row index of the data chart position.
Name | Type | Description |
---|---|---|
value? |
number |
The starting row index of the data chart position. |
any
If no value is set, returns the starting row index of the data chart position; otherwise, returns the data chart.
▸ startRowOffset(value?
): any
Gets or sets the offset relative to the start row of the data chart.
Name | Type | Description |
---|---|---|
value? |
number |
The offset relative to the start row of the data chart. |
any
If no value is set, returns the offset relative to the start row of the data chart; otherwise, returns the data chart.
▸ width(value?
): any
Gets or sets the width of a data chart.
Name | Type | Description |
---|---|---|
value? |
number |
The width of a data chart. |
any
If no value is set, returns the width of a data chart; otherwise, returns the data chart.
▸ x(value?
): any
Gets or sets the horizontal location of the data chart.
Name | Type | Description |
---|---|---|
value? |
number |
The horizontal location of the data chart. |
any
If no value is set, returns the horizontal location of the data chart; otherwise, returns the data chart.
▸ y(value?
): any
Gets or sets the vertical location of the data chart.
Name | Type | Description |
---|---|---|
value? |
number |
The vertical location of the data chart. |
any
If no value is set, returns the vertical location of the data chart; otherwise, returns the data chart.