Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Samples/DataApp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Tableau Superstore Data App

Tableau's Superstore sample workbook, rebuilt as a live-query Tableau data app in plain JavaScript with no build step.

Tableau data apps let you build a dashboard as a web app that runs inside a Tableau workbook and queries its data live. This sample has five tabs that query the Superstore sample data through the Tableau Extensions API and VizQL Data Service:

- **Overview:** KPIs, a US choropleth map, monthly sales/profit panels, and selection-driven scope.
- **Product:** a Category × Year heatmap and a Sub-Category × Segment scatter.
- **Customers:** a region summary, a customer scatter, and a ranked customer list.
- **Shipping:** an Early / On Time / Late classification, derived client-side from Order and Ship dates against a per-Ship-Mode expected-transit table.
- **Performance:** Sales vs. period-average bar-in-bar small multiples and a ranked Sub-Category view colored by profit ratio.

The Region and Order Date filters scope every tab. Requires Tableau 2026.3.1 or later.

## The data ships in the workbook

The workbook's datasource is `Tableau Superstore Data App/Data/Datasources/Sample - Superstore.xls`, the Superstore sample that Tableau installs in My Tableau Repository, referenced by relative path, so no datasource needs to exist on your site.

## Publish to Tableau Cloud

Use the [Tableau plugin](https://github.com/tableau/tableau-plugin), which brings the [Tableau MCP](https://github.com/tableau/tableau-mcp) and its data-app skill, in Codex or Claude Code.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Tableau Superstore Data App</title>
<!--
No build step: this is the shippable artifact, served verbatim. Every app
script is a classic <script> (not an ES module; see src/main.js) listed at
the end of <body> in dependency order. Each registers its exports on
window.SV. The Tableau Extensions API library
(src/tableau.extensions.1.latest.min.js) comes from the scaffold-data-app
template: keep it at this path, and load it first.
-->
<link rel="stylesheet" href="src/styles.css" />
<link rel="stylesheet" href="src/components/ProductView.css" />
<link rel="stylesheet" href="src/components/CustomersView.css" />
<link rel="stylesheet" href="src/components/ShippingView.css" />
<link rel="stylesheet" href="src/components/PerformanceView.css" />
</head>
<body>
<!-- Placeholder main.js replaces. If it stays up, the scripts never ran. -->
<div id="root"><p class="boot">Loading Tableau Superstore Data App…</p></div>
<script src="src/tableau.extensions.1.latest.min.js"></script>
<script src="src/boot.js"></script>
<script src="src/lib/dom.js"></script>
<script src="src/lib/constants.js"></script>
<script src="src/lib/vds.js"></script>
<script src="src/lib/format.js"></script>
<script src="src/components/Tooltip.js"></script>
<script src="src/components/RegionFilter.js"></script>
<script src="src/components/RangeSlider.js"></script>
<script src="src/lib/selection.js"></script>
<script src="src/components/SelectionChip.js"></script>
<script src="src/components/KpiRow.js"></script>
<script src="src/data/geo-states.js"></script>
<script src="src/lib/color.js"></script>
<script src="src/components/ChoroplethMap.js"></script>
<script src="src/components/MapLegend.js"></script>
<script src="src/components/MonthlyPanel.js"></script>
<script src="src/components/OverviewView.js"></script>
<script src="src/components/ProductView.js"></script>
<script src="src/components/CustomersView.js"></script>
<script src="src/components/ShippingView.js"></script>
<script src="src/components/PerformanceView.js"></script>
<script src="src/components/App.js"></script>
<script src="src/main.js"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Loaded first, before every other app script. The extension sandbox has no
// visible console, so any error thrown while the app's scripts load or boot is
// written over the #root placeholder instead of leaving a blank sheet. Once the
// app has mounted (.viz-root exists) it reports its own errors.
(function () {
'use strict';
window.SV = window.SV || {};
function showFatal(err) {
var root = document.getElementById('root');
if (!root || root.querySelector('.viz-root')) return;
var p = document.createElement('p');
p.className = 'error boot';
p.textContent =
'Data app failed to start: ' + ((err && (err.message || err.errorCode)) || String(err));
root.replaceChildren(p);
}
window.SV.showFatal = showFatal;
window.addEventListener('error', function (e) {
showFatal(e.error || e.message);
});
})();
Loading
Loading