workbook.Aspect
Object Description |
An aspect object which is used when you create a series. Use workbook.createAspect(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 basic Aspect
var myAspect = workbook.createAspect({
measure: myMeasure,
});
// Create a complete Aspect
var myAspect = workbook.createAspect({
measure: myMeasure,
type: workbook.AspectType.COLOR
});
// View a workbook.Aspect used in a Chart
var myWorkbook = workbook.load ({
id: myWorkbookId
});
var myAspect = myWorkbook.charts[0].series[0].aspect[0];
// Note that some Aspect properties may be empty/null based on the loaded workbook
log.audit({
title: 'Aspect type = ',
details: myAspect.type
});
log.audit({
title: 'Aspect measure = ',
details: myAspect.measure
});
...
// Add additional code