ExcelScript.ChartAxes interface
Representa os eixos de um gráfico.
Comentários
Exemplos
/**
* This sample gets the chart axes and customizes them.
* This assumes the active worksheet has a chart.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the first chart on the active worksheet.
const sheet = workbook.getActiveWorksheet();
const chart = sheet.getCharts()[0];
// Access and customize the axes.
const axes = chart.getAxes();
axes.getValueAxis().setDisplayUnit(ExcelScript.ChartAxisDisplayUnit.thousands);
axes.getCategoryAxis().setVisible(true);
}
Métodos
| get |
Representa o eixo de categoria em um gráfico. |
| get |
Retorna o eixo específico identificado por tipo e grupo. |
| get |
Representa o eixo da série de um gráfico 3D. |
| get |
Representa o eixo dos valores em um eixo. |
Detalhes do método
getCategoryAxis()
Representa o eixo de categoria em um gráfico.
getCategoryAxis(): ChartAxis;
Retornos
Exemplos
/**
* This sample gets and customizes the category axis.
* This assumes the active worksheet has a chart.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the first chart on the active worksheet.
const sheet = workbook.getActiveWorksheet();
const chart = sheet.getCharts()[0];
// Get and customize the category axis.
const categoryAxis = chart.getAxes().getCategoryAxis();
categoryAxis.setTickLabelPosition(ExcelScript.ChartAxisTickLabelPosition.low);
}
getChartAxis(type, group)
Retorna o eixo específico identificado por tipo e grupo.
getChartAxis(type: ChartAxisType, group?: ChartAxisGroup): ChartAxis;
Parâmetros
Especifica o tipo de eixo. Veja ExcelScript.ChartAxisType para obter detalhes.
Opcional. Especifica o grupo de eixos. Veja ExcelScript.ChartAxisGroup para obter detalhes.
Retornos
getSeriesAxis()
Representa o eixo da série de um gráfico 3D.
getSeriesAxis(): ChartAxis;
Retornos
getValueAxis()
Representa o eixo dos valores em um eixo.
getValueAxis(): ChartAxis;
Retornos
Exemplos
/**
* This sample gets and customizes the value axis.
* This assumes the active worksheet has a chart.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the first chart on the active worksheet.
const sheet = workbook.getActiveWorksheet();
const chart = sheet.getCharts()[0];
// Get and customize the value axis.
const valueAxis = chart.getAxes().getValueAxis();
valueAxis.setDisplayUnit(ExcelScript.ChartAxisDisplayUnit.thousands);
valueAxis.setMinimum(40000);
valueAxis.setMaximum(60000);
}