exportCrossTabToExcelmethod. This method performs the same function as the Worksheet > Export > Crosstab to Excel operation in Tableau. The method generates the
.xlsxfile and downloads it to your default location.
applyRangeFilterAsyncmethod now correctly supports
NullOptionenumeration. The method supports the equivalent functions of the Filter dialog box for dimensions or measures. You can include or exclude null values from a range, or set a special filter for all null or non-null values.
GetFiltersAsyncOptionsmethod, now correctly checks for the Only Relevant Values option when evaluating other filter settings that might be set, and returns only the values that pass those filters. The method now accurately returns all the filters used in a sheet.
- When a Tableau view is embedded in a Salesforce page, the dropdown menus in the view now work as expected.
- When you click column or row headers in an embedded Tableau view, selection events now fire correctly.
getUnderlyingDataAsync. Starting in Tableau 2020.2, a data source can have multiple logical tables, and a logical table can contain one or more physical tables. If you have an existing embedding solution that use the deprecated
getUnderlyingDataAsync()method to get underlying data, the method call could fail if the data source contains more than one logical table. You should update your embedding solution to use these new methods.
Interface/Method Tableau 2020.2 and later Worksheet.getUnderlyingDataAsync Deprecated Worksheet.getUnderlyingTablesAsync New Worksheet.getUnderlyingTableDataAsync New
LogicalTableclass that has two properties:
getCaptionreturns the name of the table as it appears in Tableau. To get the underlying data from the table, you use the id returned by
getTableId()when you call the
For more information about getting underlying data from worksheets, see the Get Underlying Table Data Example.
New method showExportPowerPointDialog() that displays the Export to Power Point dialog box, which shows a dialog allowing the user to choose the sheets from the workbook or dashboard to download in a PowerPoint file.
Support for URL action events (
URL_ACTION). You can now use the addEventListener() method to add an event listener for URL actions. For more information, see URL Action Example.
The selectMarksAsync() method now correctly initiates the URL action associated with the selection.
There is a new property for categorical filters. The getIsAllSelected() property returns true if all values in the filter are selected.
The getAppliedValues() property now correctly returns the selected values if the number of selected values is under 5000. The getAppliedValues() property previously placed a 5000 value limit to the full domain of the filter, so if the filter domain had more than 5000 values, only the selected values from the first 200 values were returned. Now the return set is first filtered to the selected values before the limit of 5000 values is applied. Therefore, if the number of selected values is less than 5000, the complete set of selected values is returned. If the number of selected values is over 5000, only the first 200 selected values are returned. For more information, see CategoricalFilter Class.
You can now access toolbar buttons so that you can customize the controls for the visualization. In this release, you can call methods to control the Undo and Redo buttons and set up an event listener to monitor toolbar state changes. For more information, see Toolbar State Example.
Get Data for Visualizations
You can now get the data that was used to create the currently displayed visualization. Use the
getSummaryDataAsync method and the
getUnderlyingDataAsync method to get data for the currently active sheet. The
getSummaryDataAsync method displays aggregated data for the fields used in the current view, that is, it displays data only for the measures and dimensions used to create the view. The
getUnderlyingDataAsync method displays data for all fields in the data source that is used by the current view. For more information, see Get Data and the API Reference.
Easier way to load the latest version of the API
tableau_2.min.js. This in turn loads the most recent version of the library.
For details, see Accessing the API.