Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Color and Size Legends

Public visualization

Viewing a saved revision (read-only)

81c5866bb0e747838c871b387df6df1d

Color and Size Legends

0 stars1🌍 Public
Hhanulik.ondrej@gmail.com
Last edited Aug 24, 2021
Created on Aug 12, 2021
Forked from mujSmile

A legend example displays categorical color scales using D3 v6’s scaleOrdinal, rendering SVG circles and text labels. Each circle’s fill is mapped directly from the color scale’s domain, while a text offset places labels beside the markers. The colorLegend function accepts a color scale and spacing properties, using selection.merge and enter/update patterns to manage the DOM. Data originates from a hardcoded array of fruit names, with no external dataset loaded.

AI-generated description

start 8:05:00 průběžně 8:21:30 konec 8:33:00

<b>Functions are Objects</b><br> The typeof operator in JavaScript returns "function" for functions.

But, JavaScript functions can best be described as objects.

JavaScript functions have both properties and methods.