Public
Edited
Apr 15
Insert cell
Insert cell
Insert cell
myColors = [
{ "group": "Patrick, David und Valentin", "color": "#80cbc4" },
{ "group": "Susi und Tatjana", "color": "#64b5f6" },
{ "group": "Patrick", "color": "#ef5350" },
{ "group": "David", "color": "#66bb6a" },
{ "group": "Valentin", "color": "#f06292" },
{ "group": "Designer", "color": "#ffab91" },
{ "group": "Corina", "color": "#ffd54f" },
{ "group": "Nika", "color": "#fff176" },
{ "group": "BKA", "color": "#eceff1" },
{ "group": "Slolingo", "color": "#a5d6a7" }
]

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
domainByDate = tasks.sort((a, b) => d3.ascending(a.startDate, b.startDate)).map(d => d.task)
Insert cell
Insert cell
domainByGroup = d3.groups(tasks, d => d.group).sort((a, b) => d3.ascending(a.startDate, b.startDate)).map(d => d[0])
Insert cell
Insert cell
parser = d3.utcParse("%Y-%m-%d")
Insert cell
Insert cell
colorMap = new Map(myColors.map((obj) => [obj.group, obj.color]))
Insert cell
colors = domainByGroup.map(d => colorMap.get(d))
Insert cell
Insert cell
import {getIcon} from '@observablehq/product-education-icon-helpers'
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more