ExcelScript.ChartErrorBarsType enum
Represents the range type for error bars.
Remarks
Examples
/**
* 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);
});
}
Fields
custom | |
fixedValue | |
percent | |
stDev | |
stError |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Scripts