Skip to content

Instantly share code, notes, and snippets.

@lmatteis
lmatteis / index.html
Created January 19, 2021 14:04
Test for blocks
<b>Foo Bar</b>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lmatteis
lmatteis / index.html
Last active February 7, 2020 07:44
Multiple pie charts, of different size, on map
<!DOCTYPE html>
<!-- saved from url=(0054)http://dc-js.github.io/dc.js/examples/stacked-bar.html -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div id="map"></div>
<div id="pie-chart"></div>
@lmatteis
lmatteis / file.js
Last active December 10, 2019 20:15
const x = readInput();
if (isMultipleOfThree(x) && endsWithDigitFive(x)) {
return true;
} else {
return false;
}
function getPromotionalCode() {
...
if (!promotionalCode) {
emit('NoPromotionalCode')
}
...
}
diff --git a/test/package-lock.json b/test/package-lock.json
index db14f329..31122d5b 100644
--- a/test/package-lock.json
+++ b/test/package-lock.json
@@ -9,7 +9,7 @@
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
"integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
"requires": {
- "@babel/highlight": "^7.0.0"
+ "@babel/highlight": "7.5.0"
@lmatteis
lmatteis / README.md
Last active September 28, 2019 15:25
Generic interactive D3.js charts using crossfilter.js

Try clicking on the various charts. All interactions are handled by crossfilter. Multi selection is also possible using crossfilter. This also shows how one can create reusable charts that support generic dimensions and groups.

@lmatteis
lmatteis / index.html
Last active August 23, 2019 23:29
Scrollable bar charts with nested scales and fixed x axis
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.bar--positive {
fill: #9BCCF5;
}
.bar--negative {
fill: pink;
const card = yield { wait: cardInserted }
yield { request: { type: loadAccount, card } }
(isEnterpriseUser
? Promise.resolve()
: showAdvertisement()
)
.then(() => loadAccount(card))
.then(...)