workbook.ChartAxis
Object Description |
A chart axis object which is used when you create a category or a legend. Use workbook.createChartAxis(options) to create this object. |
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Module |
|
Methods and Properties |
|
Since |
2020.2 |
Syntax
Important:
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/workbook Module Script Samples. Also see Full scripts in the Tutorial: Creating a Workbook Using the Workbook API topic.
// Add additional code
...
// Create a ChartAxis
var myChartAxis = workbook.createChartAxis({
title: 'My ChartAxis'
});
// View a workbook.ChartAxis used in a Chart
var myWorkbook = workbook.load ({
id: myWorkbookId
});
var myCategoryChartAxis = myWorkbook.charts[0].category.axis;
log.audit({
title: 'Category ChartAxis title = ',
details: myCategoryChartAxis.title
});
var myLegendChartAxis = myWorkbook.charts[0].legend.axes[0];
log.audit({
title: 'Legend ChartAxis title = ',
details: myLegendChartAxis.title
});
...
// Add additional code