Note

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

Access to this page requires authorization. You can try .

Excel.ChartSeriesDimension enum

Package:
excel

Represents the dimensions when getting values from chart series.

Remarks

API set: ExcelApi 1.12

Used by

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.


Feedback

Was this page helpful?