Skip to main content
100%

D3 Selection Exploration

✓ Published0🌍 Public
Nnreinig3@gatech.edu
Last edited Dec 18, 2023
Created on Dec 18, 2023

This example demonstrates how D3’s `ascending` comparator can be used to sort an array of key-value pairs by their keys. The code defines a static dataset of three entries with keys A, C, and B, logs the original array, then logs the sorted result after applying `entries.sort((a, b) => ascending(a.key, b.key))`. The visualization is minimal, relying only on an HTML page with a large centered text message and no graphical rendering. It uses D3 version 7.8.5 within a React project, but the focus is purely on console-based data manipulation rather than visual output.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes