Published
Edited
Dec 18, 2021
4 forks
Importers
95 stars
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
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
function getColorDemo(percentage) {
const start = startHue2
const end = endHue2
const distance = end - start
const hue =
percentage < 0.5
? start + distance * percentage * 2
: end - distance * (percentage - 0.5) * 2
return `hsl(${hue}, ${saturation2}%, ${lightness2}%)`
}
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
style = html`
<style>
@keyframes in {
0% {
transform: translate(0 , calc(-1 * var(--offset))) scale(0);
}
100% {
transform: translate(0, 0) scale(1);
}
}

@keyframes out {
0% {
transform: translate(0, 0) scale(1);
}
100% {
transform: translate(0 , calc(var(--offset))) scale(0);
}
}

svg {
--duration: 1000ms;
--delay-factor: 0.5;
}

g {
transform-origin: center;
}
.result circle {
mix-blend-mode: darken;
transform-origin: var(--x) var(--y);
}

.in > circle {
--easing: cubic-bezier(0, 0, 0, 1);
--delay: calc(var(--duration) * 0.75 + var(--random) * var(--duration) * var(--delay-factor));
animation: in var(--duration) var(--delay) var(--easing) both;
}

.out > circle {
--easing: cubic-bezier(1, 0, 1, 1);
--delay: calc(var(--random) * var(--duration) * var(--delay-factor));
animation: out var(--duration) var(--delay) var(--easing) both;
}
</style>
`
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