Published
Edited
May 12, 2021
Importers
1 star
Insert cell
Insert cell
Insert cell
viewof t1 = intervals()
Insert cell
t1
Insert cell
Insert cell
viewof t2.data
Insert cell
// Uncomment
//
// (viewof t2.data = [
// // { start: -1, end: 1 },
// // { start: 0, end: 2 },
// { start: 3, end: 6 }
// // { start: 2.5, end: 7 }
// ])
Insert cell
viewof t2 = {
const min = -2;
const max = 10;
const colorScale = d3
.scaleLinear()
.domain([min, max])
.range(["#a52a2a88", "#4682b488"])
.interpolate(d3.interpolateHcl);
return intervals({
value: 5.72,
min,
max,
step: 0.1,
width: 600,
zoomRange: [min, max],
zoomTranslateExtent: [-5, 11],
zoomScaleExtent: [1, 10000],
zoomDisabled: false,
data: [
//{ start: -1, end: 1 },
{ début: 0, end: 2 },
{ début: 1, end: 2 },
{ début: 3, end: 5 }
// { start: 2.5, end: 7 }
],
color: d => colorScale(d.début),
startof: d => d.début,
endof: d => d.end,
height: 12,
rectHeight: 8
});
}
Insert cell
t2
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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more