Published
Edited
Apr 22, 2021
Fork of Tiny Charts
Importers
Insert cell
Insert cell
Insert cell
Insert cell
line(randarray_small, {
width: 125,
height: 25,
color: "black",
size: 1,
highlights: { start: null, end: null, min: null, max: null },
datum: null,
scaling: "min",
margin: { horizontal: 0, vertical: 0 }
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
bar(randarray_small, {
width: 125,
height: 25,
color: { fill: "gainsboro", stroke: "grey" },
highlights: { start: null, end: null, min: null, max: null },
scaling: "zero",
margin: { horizontal: 0, vertical: .01 }
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
histogram(randarray, {
domain: [-4, 7],
thresholds: 20,
color: { fill: '#dc267f' },
domainline: { size: 1, stroke: "#1e90ff" },
margin: { vertical: 0, horizontal: 0 },
yScale: d3.scaleSymlog
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
area(randarray_small, {
width: 125,
height: 25,
color: { line: "black", fill: "silver" },
highlights: { start: null, end: null, min: null, max: null },
scaling: "zero",
margin: { horizontal: 0, vertical: 0 }
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
ticks(randarray, {
domain: [-5, 5],
width: 125,
height: 25,
color: 'rgba(255,0,0,0.2)',
margin: { horizontal: 0, vertical: 0 }
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
range(russell3000_padjclose, {
width: 125,
height: 25,
color: { fill: "slategray", stroke: "slategray" },
text: {
fill: "black",
stroke: "transparent",
font: "9px 'Open Sans'",
format: ",.2f"
},
domain: [d3.min(russell3000_padjclose), d3.max(russell3000_padjclose)],
domainline: { size: 1, stroke: "slategray" },
margin: { horizontal: .04, vertical: .125 }
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
sparkbar(50, 100)
Insert cell
function sparkbar(
value,
max,
{ background = "steelblue", color = "white", value: showed = value } = {}
) {
return html`<div style="display: grid;
grid-template-columns: 1fr;
grid-template-rows: 1fr;
justify-items: end;
text-align: right">
<div style="grid-area: 1 / 1 / 2 / 2;
background: ${background};
width: ${(100 * value) / max}%;">&nbsp;</div>
<div style="grid-area: 1 / 1 / 2 / 2;
padding-right: 3px;
color: ${color}">${showed.toLocaleString("fr")}`;
}
Insert cell
.parent {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: 1fr;
grid-column-gap: 0px;
grid-row-gap: 0px;
}

.div1 { grid-area: 1 / 1 / 2 / 2; }
.div2 { grid-area: 1 / 1 / 2 / 2; }
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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