Chart Object Members in SuiteScript for Data Visualization
Chart object members in SuiteScript provide essential properties for data visualization. Learn how to create and customize charts with various attributes.
TL;DR
Chart object members in SuiteScript allow for robust handling of data visualization through various attributes. This functionality enhances the ability to create and customize charts in NetSuite workbooks, making data insights more accessible.
What Are Chart Object Members?
The Chart object in SuiteScript is a key element used for visualizing dataset query results. This object allows developers to create various chart types, including bar and line graphs, and is instrumental in making data more understandable.
Key Members of the Chart Object
Below are the primary members available for the workbook.Chart object:
| Member Name | Return Type | Description |
|---|---|---|
Chart.aggregationFilters | Array of workbook.LimitingFilter or workbook.ConditionalFilter | Limiting and conditional filters for the chart. |
Chart.category | string | The category of the chart. |
Chart.dataset | dataset.Dataset | The underlying dataset for the chart. |
Chart.filterExpressions | Array of workbook.Expression | The filter expressions of the chart. |
Chart.id | string | The ID of the chart. |
Chart.legend | workbook.Legend | The legend representation of the chart. |
Chart.name | string | The name assigned to the chart. |
Chart.series | workbook.Series | The series data of the chart. |
Chart.stacking | string | The stacking type for the chart. |
Chart.subTitle | string | The subtitle associated with the chart. |
Chart.title | string | The main title of the chart. |
Chart.type | workbook.ChartType | The specific type of the chart. |
How to Create a Chart
To define a chart in SuiteScript, utilize the workbook.createChart() method, which allows you to customize various properties in your chart configuration. Below is an example illustrating both a basic and a more comprehensive chart creation:
Basic Chart Creation
1// Create a basic Chart 2var myChart = workbook.createChart({3 name: 'myChart',4 id: '_myChart',5 type: workbook.ChartType.BAR,6 legend: myLegend,7 series: [mySeries],8 dataset: myDataset9});Comprehensive Chart Creation
1// Create a comprehensive Chart2var myChart = workbook.createChart({3 name: 'myChart',4 title: 'My Chart Title',5 subTitle: 'My Chart Subtitle',6 id: '_myChart',7 type: workbook.ChartType.BAR,8 stacking: workbook.Stacking.PERCENT,9 legend: myLegend,10 series: [mySeries],11 filterExpressions: [myExpression],12 aggregationFilters: [myLimitingFilter],13 dataset: myDataset14});Who This Affects
- Developers: Understanding how to utilize chart objects can enhance reporting and data visualization in applications.
- Administrators: Customizing and configuring charts will improve insight generation from data queries.
Key Takeaways
- The
workbook.Chartobject is essential for visualizing data in SuiteScript. - Key properties include aggregation filters, datasets, and chart types, enabling tailored data representation.
- The
createChartmethod provides flexibility in chart creation for better analytics.
Frequently Asked Questions (4)
Do I need to enable any feature flags to use Chart object members in SuiteScript?
What permissions are required to create charts using SuiteScript?
How does the Chart object interact with datasets in SuiteScript?
Is the Chart object available in all editions of NetSuite?
Was this article helpful?
More in SuiteAnalytics
- Class, Department, Location Features in NetSuite 2026.1
Class, Department, and Location features enhance financial processes in NetSuite 2026.1 for improved insights and reporting.
- New HTML Formulas in Search for NetSuite 2025.1
New HTML Formulas in Search introduced in NetSuite 2025.1 enhances security for saved searches. Starting in NetSuite 2025.1, the HTML Formulas in Search feature
- Export Pivot Tables to Excel in NetSuite 2024.2
Export Workbook pivot tables to Excel XLSX format starting with NetSuite 2024.2, enhancing data analysis and reporting capabilities.
- Consolidated Reports and SuiteQL in NetSuite 2026.1
Consolidated reports and SuiteQL enhance data access in NetSuite 2026.1. Discover key integration features.
Advertising
Reach SuiteAnalytics Professionals
Put your product in front of NetSuite experts who work with SuiteAnalytics every day.
Sponsor This Category