# Charts, maps and 3D

Show your data as charts, on a map or in 3D, the same way in every module and in the workspace's own colors.

Pictures beat tables. The platform gives every module the same **charts**, **maps** and **3D viewer**, so your screens look like the rest of the app, follow light and dark mode, and use the workspace's brand colors without you picking a single one.

## Charts from a dataset

There are two ways to chart your data, and both start from a [dataset](article:e4966ea4-7f77-4361-9a0b-7f594c97cb8f):

| Way | Best for |
|---|---|
| **Publish a dataset** and let people build charts on the dashboards, or ask the Dashboards & Reports agent | Reporting. Nothing to draw in your module. |
| **A chart on your own screen** | A chart that belongs where people work, like a trend over a job list. |

A chart on your screen uses the same chart design as a dashboard card, so both look alike. Chart types:

- **Bar**, **line**, **area**, **pie** or donut
- **Metric** tiles with a change arrow and a small trend line
- **Table**

Extras include target lines, values on the bars, *top 10 plus "Other"*, and stacked bars. Every chart can be downloaded as CSV, SVG or PNG, and prints in color.

**Leave colors off.** The first series takes the workspace's brand color and the rest come from a palette checked for color-blind readers. Set a color only when someone asks for one.

## Maps and address lookups

Maps are Google Maps, run by the platform. Your module declares that it uses maps and says why, in one sentence. When a workspace installs it, its Workspace Admin is asked to approve Maps, with the price, under **System settings › Billing**. Once approved, maps work straight away.

Maps are **metered**: each map shown and each address looked up counts, billed per 1,000. So:

1. **Look an address up once** and save the coordinates on the record.
2. **Look it up again only when the address changes.**
3. **Keep a fallback.** Until Maps is approved, show the address and a plain link to Google Maps.

## The 3D kit

The platform includes a ready-made 3D toolkit (three.js) with realistic lighting and a model loader. Ship your models as `.glb` files, give them a real-world size, and they sit neatly in the scene. It also reads common CAD and mesh files (STL, PLY, OBJ, FBX, 3MF) and Gaussian splats (3D scans).

## Ask the Module Builder

> *"On the jobs screen, add a bar chart of open jobs by crew, and a map with a pin for each job's address."*

## For developers

```html
<script src="/static/platform-sdk.js"></script>
<script src="/static/platform-charts.js"></script>
<script type="module">
  Platform.charts.renderDataset(document.getElementById('crews'),
    { dataset: 'JOBS.jobs', dimensions: ['crew'], metrics: ['jobs'] },
    { chart_type: 'bar', options: { orientation: 'horizontal', data_labels: true } });
</script>
```

Maps: `"platform_services": [{"code": "MAPS", "why": "Shows each job on a map"}]`, then `Platform.maps.available()`, `load()` and `geocode()`.

## Good to know

- **No outside chart or map scripts.** Loading a library from the web blocks a Marketplace listing; use the platform's.
- **No second value axis.** Two measures of different scale go in two charts.
- **Big models** (over 10 MB a file) belong in [Storage](article:4c8a50b6-7a7d-4f07-b1fe-b8748ecddd6f), not in the module itself.
- **Map costs** are on the workspace's bill. See [What a module costs to run](article:dd966d79-6c2d-43c0-8d6e-3dff5886192d).


Source: https://datavisions.ai/docs/creators/platform-services/charts-maps-and-3d
