module function · N/workbook

createChart()

workbook.createChart(options)

Creates a chart.

Implementation
Not started
Design
Open for proposals suggest how it should read
Proposals
A
Signature
workbook.createChart(options)
Returns
workbook.Chart
Governance
None
Script types
Server scripts
Version
SuiteScript 2.x, documented for 2.1; since NetSuite 2020.2
call shapefrom Oracle's parameter table
1workbook.createChart({2    category:    /* workbook.Category, required */,3    dataset:     /* dataset.Dataset, required */,4    datasetLink: /* datasetLink.DatasetLink, required */,5    id:          /* string, required */,6    legend:      /* workbook.Legend, required */,7    name:        /* string, required */,8    portletName: /* string | workbook.Expression, required */,9    series:      /* workbook.Series [], required */,10    stacking:    /* workbook.Stacking, optional */,11    subTitle:    /* string | workbook.Expression, optional */,12    title:       /* string | workbook.Expression, optional */,13    type:        /* workbook.ChartType, required */14});
Oracle reference for this method
ParameterTypeRequiredDescription
options.categoryworkbook.CategoryrequiredThe category of the chart.
options.datasetdataset.DatasetrequiredThe underlying dataset that the chart is based on. A chart can include only the data (fields) that are included in the dataset.
options.datasetLinkdatasetLink.DatasetLinkrequiredThe datasetLink on which the chart is based
options.idstringrequiredThe ID of the chart.
options.legendworkbook.LegendrequiredThe legend for the chart.
options.namestringrequiredThe name of the chart.
options.portletNamestring | workbook.ExpressionrequiredThe name of the portlet for the chart.
options.seriesworkbook.Series []requiredThe set of series for the chart. Each series includes information about how each data point is calculated. For example, a series can represent the sum of transaction amounts for a customer in a particular month.
options.stackingworkbook.StackingoptionalThe stacking type that describes how the chart data is stacked.
options.subTitlestring | workbook.ExpressionoptionalThe subtitle of the chart.
options.titlestring | workbook.ExpressionoptionalThe title of the chart.
options.typeworkbook.ChartTyperequiredThe type of the chart.
B

No Mynt syntax yet.

Nothing in the language compiles to workbook.createChart(options) today. How should it read?

C

Competing syntax for createChart, from GitHub Discussions. Select two or more to compare them side by side.

All discussions

Loading proposals from GitHub…

D

Write the Mynt you wish you could write.

A good proposal shows the syntax, the SuiteScript it should become, and argues for it: why it is clearer, how it fits the rest of the language, what it makes harder.

  • Clarity. Does it say what happens, without ceremony?
  • Consistency. Does it read like load, save and Ref[field]?
  • Expressiveness. Does it cover the cases people actually write?
  • Honesty. Does it hide a NetSuite cost, such as governance, that a reader should see?

N/workbook · workbook.createChart(options)

Suggest syntax for createChart