Skip to main content
100%

A D3 word cloud (FAIL#2)

✓ Published1🌍 Public
RRussell Watson
Last edited Feb 5, 2020
Created on Feb 5, 2020

This example attempts to render a colored word cloud from a dataset of programming-language names duplicated three times. The visualization uses SVG text elements positioned by the d3-cloud layout, which is imported from the non-standard d3.layout.cloud module. The code employs d3.scaleSequential with interpolateRainbow to assign colors, but fails because d3-cloud is built for D3 v3 and does not export a `cloud` function compatible with D3 v5, throwing a TypeError before any layout is drawn.

AI-generated description

Attempt 2 to make a word cloud based on Fil's D3 cloud example on observable

This time it hasn't worked, because the d3-cloud module is a non-standard module based on d3 version 3:

TypeError: cloud is not a function
MIT Licensed

Similar vizzes