Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Excel.ChartLineStyle enum

Package:
excel

Remarks

API set: ExcelApi 1.7

Used by

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/10-chart/chart-leader-lines.yaml

// The following code changes the format of leader lines. It adjusts color, weight, and line style.
await Excel.run(async (context) => {
 const sheet = context.workbook.worksheets.getItem(sheetName);
 const chart = sheet.charts.getItemAt(0);
 const series = chart.series.getItemAt(0);
 const dataLabels = series.dataLabels;
 const lineFormat = dataLabels.leaderLines.format;

 // Set leader line formatting properties.
 lineFormat.line.color = "blue";
 lineFormat.line.weight = 2;
 lineFormat.line.lineStyle = Excel.ChartLineStyle.dot;

 await context.sync();
});

Fields

automatic = "Automatic"
continuous = "Continuous"
dash = "Dash"
dashDot = "DashDot"
dashDotDot = "DashDotDot"
dot = "Dot"
grey25 = "Grey25"
grey50 = "Grey50"
grey75 = "Grey75"
none = "None"
roundDot = "RoundDot"

Feedback

Was this page helpful?