Skip to main content
100%

D3 vanila

✓ Published0🌍 Public
Xxani
Last edited May 19, 2021
Created on May 18, 2021
Forked from HTML Starter

This example demonstrates sorting an array of objects by their `key` property using plain JavaScript within an HTML page styled with CSS. The code defines three entries with keys A, C, and B, then applies the `Array.sort()` method with a comparison function that returns -1 or 1 based on ascending order. It relies on the `d3` library, specifically importing the `ascending` function from version 6.6.1, though the visible sort logic implements the comparison manually. The result is logged to the browser console, showing the reordered entries B, C, A.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes