ExcelScript.ChartErrorBarsType enum
表示误差线的范围类型。
注解
示例
/**
* This script adds error bars for the standard error of each chart series point.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the range for the chart.
const worksheet = workbook.getWorksheet("Sample");
const dataRange = worksheet.getRange("A1:B15");
// Create a line chart.
const chart = worksheet.addChart(ExcelScript.ChartType.line, dataRange);
// For each series, add error bars for the standard error on each point.
const allSeries = chart.getSeries();
allSeries.forEach((series) => {
series.getYErrorBars().setType(ExcelScript.ChartErrorBarsType.stError);
series.getYErrorBars().setVisible(true);
});
}
字段
custom | |
fixedValue | |
percent | |
stDev | |
stError |