Skip to content

crossplotCross-filtered charts for TypeScript

Select a range in one chart and the other charts on the page update to show only the matching rows. crossplot provides the filtering engine and the filter state. A separate renderer package draws the charts.

Example ​

These five charts use the same table of 21,253 dinosaur fossil finds. Drag across the time chart or draw a box on the map to filter the other charts. Click without dragging to clear the filter.

Live Linked charts, running in your browser
ts
const dash = await createDashboard({ data: fromColumns(dinosaurs), renderer: plotRenderer() });

dash.chart("#age", { dimension: [bin("age", { step: 2 }), "group"], view: { mark: "stackY" } });
dash.chart("#map", { dimension: lngLat("lng", "lat", { step: 3 }), view: { mark: "map" } });
dash.chart("#country", { dimension: top("country", 10), view: { sort: "-value" } });
dash.chart("#diet", { dimension: "diet", view: { mark: "shareX" } });
dash.chart("#reported", { dimension: bin("reported", { step: 5 }), view: { mark: "areaY" } });
Linked charts in the dinosaur demo, filtered to finds from Mongolia
Demo

Dinosaur fossil finds

A page of linked charts on 21,253 dinosaur fossil finds from the Paleobiology Database. Select a family, a country or a time range, and the other charts update.

Open the demo

Status ​

crossplot 0.1 is on npm. The API can change between minor versions until 1.0.

Released under the MIT License.