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: [
{ début: 0, end: 2 },
{ début: 1, end: 2 },
{ début: 3, end: 5 }
],
color: d => colorScale(d.début),
startof: d => d.début,
endof: d => d.end,
height: 12,
rectHeight: 8
});
}