Excel.ChartSeriesDimension enum
Represents the dimensions when getting values from chart series.
Remarks
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/10-chart/chart-bubble-chart.yaml
await Excel.run(async (context) => {
const sheet = context.workbook.worksheets.getItem("Sample");
// The sample chart is of type `Excel.ChartType.bubble`.
const bubbleChart = sheet.charts.getItem("Product Chart");
// Get the first series in the chart.
const firstSeries = bubbleChart.series.getItemAt(0);
// Get the values for the dimensions we're interested in.
const bubbleSize = firstSeries.getDimensionValues(Excel.ChartSeriesDimension.bubbleSizes);
const xValues = firstSeries.getDimensionValues(Excel.ChartSeriesDimension.xvalues);
const yValues = firstSeries.getDimensionValues(Excel.ChartSeriesDimension.yvalues);
const category = firstSeries.getDimensionValues(Excel.ChartSeriesDimension.categories);
await context.sync();
// Log the information.
console.log(`Series ${category.value} - X:${xValues.value},Y:${yValues.value},Bubble:${bubbleSize.value}`);
});
Fields
bubbleSizes = "BubbleSizes" | The chart series axis for the bubble sizes in bubble charts. |
categories = "Categories" | The chart series axis for the categories. |
values = "Values" | The chart series axis for the values. |
xvalues = "XValues" | The chart series axis for the x-axis values in scatter and bubble charts. |
yvalues = "YValues" | The chart series axis for the y-axis values in scatter and bubble charts. |
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 Add-ins