Published
Edited
Jul 27, 2021
Importers
Insert cell
Insert cell
Insert cell
// The other version of this chart (by "category"), is in another noteebok here, just importing a few celds from this notebook
// https://observablehq.com/@carmen-tm/569-desglose-contratos-emergencia-categorias
chartSelector = "agency"
Insert cell
Insert cell
Insert cell
// Only define a fixed width for a non-responsive graphic. Reference:
// https://github.com/observablehq/stdlib/blob/master/README.md#width
// width = 975
Insert cell
Insert cell
myWidth = +Math.min(width, maxWidth)
Insert cell
isMobile = myWidth < 600 // 1 PARTITION
Insert cell
Insert cell
// Height should change on mobile too
height = isMobile ? mobileHeight : desktopHeight
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
styles = html`
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap" rel="stylesheet">

<style>

svg * {
font-family: 'Lato', sans-serif;
}

.cell {
pointer-events: all;
cursor: pointer;
}

text {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
pointer-events: none;
}

.cellTooltip {
display: block;
position: absolute;
z-index: 300;
visibility: hidden;
width: 200px;
max-width: 320px;
margin: 0;
padding: 0.4rem;

background: rgba(255, 255, 255, 0.9);
color: black;
box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);

font-family: 'Lato', sans-serif;
font-size: 11px;
text-align: center;
}

.tooltip-title {
color: "blue";
font-size: 14px
}
</style>
`
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