module function · N/workbook
createChart()
workbook.createChart(options)
Creates a chart.
- Implementation
- Not started
- Design
- Open for proposals suggest how it should read
A
suitescript api
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});
| Parameter | Type | Required | Description |
|---|---|---|---|
| options.category | workbook.Category | required | The category of the chart. |
| options.dataset | dataset.Dataset | required | The underlying dataset that the chart is based on. A chart can include only the data (fields) that are included in the dataset. |
| options.datasetLink | datasetLink.DatasetLink | required | The datasetLink on which the chart is based |
| options.id | string | required | The ID of the chart. |
| options.legend | workbook.Legend | required | The legend for the chart. |
| options.name | string | required | The name of the chart. |
| options.portletName | string | workbook.Expression | required | The name of the portlet for the chart. |
| options.series | workbook.Series [] | required | The 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.stacking | workbook.Stacking | optional | The stacking type that describes how the chart data is stacked. |
| options.subTitle | string | workbook.Expression | optional | The subtitle of the chart. |
| options.title | string | workbook.Expression | optional | The title of the chart. |
| options.type | workbook.ChartType | required | The type of the chart. |
B
mynt syntax
No Mynt syntax yet.
Nothing in the language compiles to workbook.createChart(options) today. How should it read?
C
community proposals
Competing syntax for createChart, from GitHub Discussions. Select two or more to compare them side by side.
Loading proposals from GitHub…
D
suggest an alternative
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,saveandRef[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?