Sum of ReboundsPerGame by Position, every row a dot
How are individual Sum of ReboundsPerGame values spread within each Position?
Per-player season averages — points, rebounds, assists, field-goal and three-point percentages, with team, position and age. A wide sports stat line for player comparison, position breakdowns, and shooting-efficiency scatter. Pairs with the NBA Shot Locations dataset.
NBA Player Season Stats: 280 rows, 9 columns. Download the CSV
| PlayerID | Team | Position | AgeYears | Sum of PointsPerGame | Sum of ReboundsPerGame | Sum of AssistsPerGame | FieldGoalPct | ThreePtPct |
|---|---|---|---|---|---|---|---|---|
| NBA1001 | PHX | SG | 25 | 16.1 | 1.7 | 3.2 | 0.449 | 0.39 |
| NBA1002 | MIL | PF | 30 | 17.8 | 4.9 | 1.7 | 0.493 | 0.325 |
| NBA1003 | DEN | PG | 23 | 15.2 | 1.6 | 6.1 | 0.482 | 0.293 |
| NBA1004 | MIL | C | 32 | 2.0 | 11.2 | 1.9 | 0.424 | 0.255 |
| NBA1005 | MIA | PF | 32 | 10.5 | 11.1 | 2.9 | 0.416 | 0.333 |
| NBA1006 | BOS | PG | 33 | 20.0 | 2.4 | 5.5 | 0.416 | 0.358 |
| NBA1007 | GSW | C | 21 | 9.6 | 10.7 | 3.4 | 0.334 | 0.387 |
| NBA1008 | MIL | PF | 19 | 7.8 | 7.7 | 2.0 | 0.326 | 0.357 |
| NBA1009 | DEN | C | 23 | 2.0 | 8.3 | 0.3 | 0.395 | 0.419 |
| NBA1010 | PHI | SG | 24 | 12.6 | 3.0 | 4.1 | 0.467 | 0.321 |

How to read it
Nothing is summarized: each dot is one row, so clusters and gaps show directly. C sits highest overall.
The chart's code (18 KB of JavaScript, D3)
It carries its own copies of these helpers: llmText, llmFrameTween, llmRangeBrush, llmSlider, llmNumberEntry, llmSegmented, llmPredictor, llmResponseCurves, llmTerritories, llmCutoff, llmContrast, llmSurvival, llmModelFormat, llmSubgroups, llmSegments, llmGlyphs, llmBreadcrumb, llmKeyframes, llmScrubber, llmValueColumn, llmValueRamp, llmFitLabel, llmThinLabels, llmFitAxisTicks, llmSymlog, llmClipOutliers, llmGeoZoom, llmGeoPointNotes, llmMapLabels, llmGeoMarks, llmPlaceUnit, llmWorldFit, llmRegionFit, llmFlowKey, llmFlowArcs, llmFrameFill, llmTooltip, llmSwarm, llmKde, llmOrbit3d, llmBoundedScale, llmBivariate, llmLegendLayout, llmPager, llmTableFrame, llmGrid, llmUtcDays, llmPeriodGrid, llmTileGrid, llmMermaid, llmDecomp, llmTopN, llmFlipDeck, llmFilterScope, llmDisplayName, llmThemeColors, llmWordCloud.
// bic:keyboard-marks
d3.llmTooltip = function (container, opts) {
opts = opts || {};
var gap = opts.gap == null ? 12 : opts.gap; // distance from the cursor
var edge = opts.edge == null ? 4 : opts.edge; // minimum distance from the container edge
var routed = false; // true while the HOST is showing our content
var lastContent = ''; // what to re-send if the host is driving
var lastEv = null; // where the cursor last was, for a re-fit
var host = (container && typeof container.node === 'function') ? container.node() : container;
var noop = { show: function () { return this; }, move: function () { return this; }, hide: function () { return this; },
html: function () { return this; }, text: function () { return this; }, node: null };
if (!host || !host.appendChild) return noop;
var mount = host;
if (mount.tagName && String(mount.tagName).toLowerCase() === 'svg' && mount.parentNode) {
mount = mount.parentNode;
}
if (!mount || !mount.appendChild) return noop;
try {
var pos = (typeof getComputedStyle === 'function') ? getComputedStyle(mount).position : '';
if (!pos || pos === 'static') mount.style.position = 'relative';
} catch (e) { /* jsdom / exec-gate: no layout engine, positioning is inert anyway */ }
var tip = mount.__llmTip;
if (!tip || tip.parentNode !== mount) {
tip = document.createElement('div');
tip.className = 'llm-tooltip';
tip.style.position = 'absolute';
tip.style.left = '0px';
tip.style.top = '0px';
tip.style.pointerEvents = 'none';
tip.style.visibility = 'hidden';
tip.style.zIndex = '20';
tip.style.boxSizing = 'border-box';
tip.style.whiteSpace = opts.wrap ? 'normal' : 'nowrap';
tip.style.background = 'rgba(255,255,255,0.97)';
tip.style.border = '1px solid rgba(0,0,0,0.28)';
tip.style.borderRadius = '4px';
tip.style.padding = '6px 9px';
tip.style.boxShadow = '0 2px 6px rgba(0,0,0,0.22)';
tip.style.color = '#222';
tip.style.fontSize = '12px';
mount.appendChild(tip);
mount.__llmTip = tip;
}
function hostTip() {
try {
var n = mount, guard = 0;
while (n && guard++ < 8) {
if (n.__lchHostTip && typeof n.__lchHostTip.show === 'function') return n.__lchHostTip;
n = n.parentNode;
}
} catch (e) { /* detached node / cross-document parent */ }
return null;
}
function metrics() {
var w = 0, h = 0, cw = 0, ch = 0;
try {
var r = mount.getBoundingClientRect();
cw = r.width; ch = r.height;
} catch (e) { /* fall through to the client* fallbacks */ }
if (!cw) cw = mount.clientWidth || 0;
if (!ch) ch = mount.clientHeight || 0;
w = tip.offsetWidth || 0;
h = tip.offsetHeight || 0;
return { w: w, h: h, cw: cw, ch: ch };
}
function local(ev) {
var x = 0, y = 0;
try {
var r = mount.getBoundingClientRect();
if (ev && ev.clientX != null) { x = ev.clientX - r.left; y = ev.clientY - r.top; }
} catch (e) {
if (ev && ev.clientX != null) { x = ev.clientX; y = ev.clientY; }
}
return { x: x, y: y };
}
function place(ev) {
var m = metrics();
if (!m.cw || !m.ch) return; // no layout to clamp against (exec gate)
var p = local(ev);
var left = p.x + gap;
if (left + m.w > m.cw - edge) left = p.x - gap - m.w;
if (left < edge) left = edge;
if (left + m.w > m.cw - edge) left = Math.max(edge, m.cw - m.w - edge);
var top = p.y + gap;
if (top + m.h > m.ch - edge) top = p.y - gap - m.h;
if (top < edge) top = edge;
if (top + m.h > m.ch - edge) top = Math.max(edge, m.ch - m.h - edge);
tip.style.left = Math.round(left) + 'px';
tip.style.top = Math.round(top) + 'px';
}
function looksLikeEvent(x) {
return !!x && typeof x === 'object' && !Array.isArray(x)
&& (typeof x.clientX === 'number' || typeof x.type === 'string' || ('target' in x));
}
function setContent(content, asText) {
if (Array.isArray(content)) content = content.map(function (x) { return x == null ? '' : String(x); }).join(asText ? ' ' : '<br/>');
lastContent = content == null ? '' : String(content);
if (!asText && typeof content === 'string' && content.indexOf('<') >= 0) tip.innerHTML = lastContent;
else tip.textContent = lastContent;
}
function setAndRefit(self, content, asText) {
setContent(content, asText);
if (routed) {
var hbSet = hostTip();
if (hbSet && hbSet.show(lastContent, lastEv) === true) return self;
routed = false; // the host let go: the tooltip is still on screen, so draw ours
return self.show(null, lastEv);
}
if (tip.style.visibility === 'visible') return self.show(null, lastEv);
return self;
}
return {
node: tip,
html: function (content) { return arguments.length ? setAndRefit(this, content, false) : lastContent; },
text: function (content) { return arguments.length ? setAndRefit(this, content, true) : (tip.textContent || ''); },
show: function (content, ev) {
if (looksLikeEvent(content) && !looksLikeEvent(ev)) { var swapped = content; content = ev; ev = swapped; }
if (ev) lastEv = ev;
if (content != null) setContent(content, false);
tip.style.maxWidth = 'none';
tip.style.visibility = 'visible'; // measurable BEFORE placing
var m = metrics();
if (m.ch && m.h + (2 * edge) > m.ch) {
var hbShow = hostTip();
if (hbShow && hbShow.show(lastContent, ev) === true) {
routed = true;
tip.style.visibility = 'hidden';
return this;
}
}
routed = false;
if (m.cw) tip.style.maxWidth = Math.max(80, m.cw - (2 * edge)) + 'px';
place(ev);
return this;
},
move: function (ev) {
if (ev) lastEv = ev;
if (routed) { var hbMove = hostTip(); if (hbMove) hbMove.move(ev); return this; }
if (tip.style.visibility === 'visible') place(ev);
return this;
},
hide: function () {
if (routed) { var hbHide = hostTip(); if (hbHide) hbHide.hide(); routed = false; }
tip.style.visibility = 'hidden';
return this;
}
};
};
d3.llmDisplayName = function (name) {
var s = name === null || name === undefined ? '' : String(name);
if (!s || /\s/.test(s)) return s.trim();
var t = s.replace(/[_]+/g, ' ');
if (/^[a-z0-9]+(?:-+[a-z0-9]+)+$/.test(t)) t = t.replace(/-+/g, ' ');
t = t.trim();
if (t !== s) return t.charAt(0).toUpperCase() + t.slice(1);
var parts = [];
var re = /[a-z][A-Z][a-z]+|[A-Z][a-z][A-Z](?![a-z])|[A-Z]+[0-9]+|[A-Z]+(?=[A-Z][a-z])|[A-Z]?[a-z]+|[A-Z]+|[0-9]+[A-Z](?![a-z0-9])|[0-9]+|[^A-Za-z0-9]+/g;
var m;
while ((m = re.exec(s)) !== null) {
if (m[0] === '') { re.lastIndex++; continue; }
parts.push(m[0]);
}
if (parts.length < 2 || parts.join('') !== s) return s;
var out = '';
for (var i = 0; i < parts.length; i++) {
var punct = /^[^A-Za-z0-9]+$/.test(parts[i]), prevPunct = i > 0 && /^[^A-Za-z0-9]+$/.test(parts[i - 1]);
out += i === 0 || punct || prevPunct ? parts[i] : ' ' + parts[i];
}
return out.trim();
};
d3.llmThemeColors = function (options) {
options = options || {};
var pick = function (v, d) { return (typeof v === 'string' && v && v !== 'transparent') ? v : d; };
var bg = pick(options.backgroundColor, pick(options.themeBg, '#ffffff'));
var fg = pick(options.themeFg, '#252423');
var hc = !!options.isHighContrast;
var pal = (options.palette && options.palette.length) ? options.palette.slice() : ['#4C78A8', '#F58518', '#54A24B', '#E45756', '#72B7B2', '#B279A2', '#FF9DA6', '#9D755D'];
var rgb = function (c) { var x = null; try { x = d3.rgb(c); } catch (e) { x = null; } return x && isFinite(x.r) ? x : d3.rgb(128, 128, 128); };
var lum = function (c) {
var r = rgb(c);
var f = function (v) { v /= 255; return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4); };
return 0.2126 * f(r.r) + 0.7152 * f(r.g) + 0.0722 * f(r.b);
};
var contrast = function (a, b) { var x = lum(a) + 0.05, y = lum(b) + 0.05; return x > y ? x / y : y / x; };
var legible = function (col, floor) {
floor = floor || 3;
var c = d3.lab(rgb(col));
var step = lum(bg) > 0.5 ? -3 : 3; // a light background darkens the hue, a dark one lightens it
for (var i = 0; i < 34 && contrast(c.formatHex(), bg) < floor; i++) c.l = Math.max(0, Math.min(100, c.l + step));
return c.formatHex();
};
var good = hc ? pick(options.themeAccent, fg) : legible('#2e7d32');
var bad = hc ? fg : legible('#c62828');
var slot = function (value, n) {
var h = 2166136261, text = String(value);
for (var i = 0; i < text.length; i++) { h ^= text.charCodeAt(i); h = Math.imul(h, 16777619) >>> 0; }
return h % n;
};
var deltaE2000 = function (x, y) {
var rad = Math.PI / 180, L1 = x.l, a1 = x.a, b1 = x.b, L2 = y.l, a2 = y.a, b2 = y.b;
var C1 = Math.sqrt(a1 * a1 + b1 * b1), C2 = Math.sqrt(a2 * a2 + b2 * b2), Cm = (C1 + C2) / 2;
var G = 0.5 * (1 - Math.sqrt(Math.pow(Cm, 7) / (Math.pow(Cm, 7) + Math.pow(25, 7))));
var a1p = (1 + G) * a1, a2p = (1 + G) * a2;
var C1p = Math.sqrt(a1p * a1p + b1 * b1), C2p = Math.sqrt(a2p * a2p + b2 * b2);
var hp = function (bb, ap) { if (bb === 0 && ap === 0) return 0; var hh = Math.atan2(bb, ap) / rad; return hh < 0 ? hh + 360 : hh; };
var h1p = hp(b1, a1p), h2p = hp(b2, a2p);
var dLp = L2 - L1, dCp = C2p - C1p, dhp = 0;
if (C1p * C2p !== 0) { dhp = h2p - h1p; if (dhp > 180) dhp -= 360; else if (dhp < -180) dhp += 360; }
var dHp = 2 * Math.sqrt(C1p * C2p) * Math.sin(dhp * rad / 2);
var Lm = (L1 + L2) / 2, Cmp = (C1p + C2p) / 2, hm = h1p + h2p;
if (C1p * C2p !== 0) { if (Math.abs(h1p - h2p) > 180) hm += (hm < 360 ? 360 : -360); hm /= 2; }
var T = 1 - 0.17 * Math.cos((hm - 30) * rad) + 0.24 * Math.cos(2 * hm * rad) + 0.32 * Math.cos((3 * hm + 6) * rad) - 0.2 * Math.cos((4 * hm - 63) * rad);
var dTh = 30 * Math.exp(-Math.pow((hm - 275) / 25, 2));
var Rc = 2 * Math.sqrt(Math.pow(Cmp, 7) / (Math.pow(Cmp, 7) + Math.pow(25, 7)));
var Sl = 1 + 0.015 * Math.pow(Lm - 50, 2) / Math.sqrt(20 + Math.pow(Lm - 50, 2)), Sc = 1 + 0.045 * Cmp, Sh = 1 + 0.015 * Cmp * T;
var Rt = -Math.sin(2 * dTh * rad) * Rc;
var tl = dLp / Sl, tc = dCp / Sc, th = dHp / Sh;
return Math.sqrt(tl * tl + tc * tc + th * th + Rt * tc * th);
};
var order = null, pool = null, near = null;
var growOrder = function (count) {
if (!order) {
order = pal.map(function (c) { return rgb(c).formatHex(); });
var taken = order.map(function (c) { return d3.lab(c); });
var seenHex = {};
order.forEach(function (c) { seenHex[c] = 1; });
pool = [];
pal.forEach(function (c) {
var h = d3.hcl(rgb(c));
if (!isFinite(h.h)) h.h = 0;
var chroma = Math.max(isFinite(h.c) ? h.c : 0, 35);
[h.l, 38, 52, 66].forEach(function (L) {
for (var k = 1; k < 18; k++) {
var cc = d3.hcl((h.h + k * 20) % 360, chroma, L);
while (!cc.displayable() && cc.c > 20) cc.c -= 5;
if (!cc.displayable()) continue;
var hl = d3.hsl(cc).l;
if (!(hl > 0.15 && hl < 0.85)) continue;
var hx = cc.formatHex();
if (seenHex[hx]) continue;
seenHex[hx] = 1;
pool.push({ hex: hx, lab: d3.lab(hx) });
}
});
});
near = pool.map(function (q) {
var m = Infinity;
for (var t = 0; t < taken.length; t++) m = Math.min(m, deltaE2000(q.lab, taken[t]));
return m;
});
}
while (order.length < count && pool.length) {
var best = 0;
for (var q = 1; q < pool.length; q++) if (near[q] > near[best]) best = q;
var picked = pool.splice(best, 1)[0];
near.splice(best, 1);
order.push(picked.hex);
for (var r2 = 0; r2 < pool.length; r2++) near[r2] = Math.min(near[r2], deltaE2000(pool[r2].lab, picked.lab));
}
for (var round = 1; order.length < count && round < 40; round++) {
for (var e = 0; e < pal.length && order.length < count; e++) {
var hc = d3.hsl(pal[e]);
if (!isFinite(hc.h)) hc.h = 0;
var step = Math.ceil(round / 2) * 0.12 * (round % 2 ? 1 : -1);
hc.l = Math.max(0.12, Math.min(0.88, hc.l + step));
hc.h = (hc.h + round * 7) % 360;
var cx = hc.formatHex();
if (order.indexOf(cx) < 0) order.push(cx);
}
}
};
var extended = function (count) {
if (pal.length >= count) return pal.slice();
growOrder(count);
return pal.slice().concat(order.slice(pal.length, count));
};
var memory = function () {
var m = d3.__lchCategorySlots;
if (!m || !Array.isArray(m.groups)) { m = { groups: [] }; try { d3.__lchCategorySlots = m; } catch (e) { /* a frozen d3: no memory */ } }
return m;
};
var categories = function (values) {
var seen = {}, list = [];
(values || []).forEach(function (v) { var k = v === null || v === undefined ? '' : String(v); if (!seen[k]) { seen[k] = 1; list.push(k); } });
list.sort();
var mem = memory(), group = null, best = 0;
mem.groups.forEach(function (g) {
var shared = 0;
list.forEach(function (k) { if (Object.prototype.hasOwnProperty.call(g.slots, k)) shared++; });
if (shared > best) { best = shared; group = g; }
});
if (!group) {
group = { slots: {}, used: {}, size: 0 };
mem.groups.push(group);
if (mem.groups.length > 32) mem.groups.shift();
}
var fresh = list.filter(function (k) { return !Object.prototype.hasOwnProperty.call(group.slots, k); });
var total = group.size + fresh.length;
var cols = extended(Math.max(list.length, total));
var n = cols.length;
fresh.forEach(function (k) {
if (group.size >= 2000) return; // a category this long is not a palette's job: past it, a value is placed but not remembered
var i = 0;
while (group.used[i] && i < n) i++;
group.used[i] = 1;
group.slots[k] = i;
group.size++;
});
var map = {};
list.forEach(function (k) {
var i = Object.prototype.hasOwnProperty.call(group.slots, k) ? group.slots[k] : slot(k, n);
if (i >= cols.length) cols = extended(i + 1);
map[k] = cols[i % cols.length];
});
return function (v) {
var k = v === null || v === undefined ? '' : String(v);
return map[k] || cols[slot(k, n)];
};
};
return { bg: bg, fg: fg, good: good, bad: bad, categories: categories, legible: function (c) { return legible(c); }, contrast: contrast, palette: pal };
};
function render(container, data, options) {
container.replaceChildren();
const W = options.width, H = options.height;
const fg = options.themeFg || 'currentColor';
const svg = d3.select(container).append('svg').attr('width', W).attr('height', H);
const cols = data.columns.map(c => c.name);
const iPos = cols.indexOf('Position');
const iVal = cols.indexOf('Sum of ReboundsPerGame');
if (iPos < 0) throw new Error('INVALID:column "Position" not found');
if (iVal < 0) throw new Error('INVALID:column "Sum of ReboundsPerGame" not found');
const iId = cols.indexOf('PlayerID'), iTeam = cols.indexOf('Team'), iAge = cols.indexOf('AgeYears');
const nf = new Intl.NumberFormat(options.cultureCode, { maximumFractionDigits: 2 });
const pts = [];
let dropped = 0;
data.rows.forEach((r, i) => {
const v = r[iVal];
const c = r[iPos];
if (v == null || v === '' || !isFinite(+v) || c == null || c === '') { dropped++; return; }
pts.push({ i, cat: String(c), v: +v, row: r });
});
if (!pts.length) {
const msg = (typeof options.noDataText === 'string' && options.noDataText) ? options.noDataText : 'No data to display';
svg.append('text').attr('x', W / 2).attr('y', H / 2).attr('text-anchor', 'middle').attr('fill', fg).attr('font-size', 12).text(msg);
return;
}
const medBy = d3.rollups(pts, v => d3.median(v, d => d.v), d => d.cat)
.sort((a, b) => d3.descending(a[1], b[1]));
const cats = medBy.map(d => d[0]);
const rowIdxByCat = new Map();
pts.forEach(p => { if (!rowIdxByCat.has(p.cat)) rowIdxByCat.set(p.cat, []); rowIdxByCat.get(p.cat).push(p.i); });
const overallMed = d3.median(pts, d => d.v);
const T = d3.llmThemeColors(options);
const color = T.legible(T.categories(['players'])('players'));
const yLabel = d3.llmDisplayName('Sum of ReboundsPerGame'.replace(/^Sum of /, ''));
const xLabel = d3.llmDisplayName('Position');
const note = dropped > 0 ? `${dropped} players are not drawn: no value for ${yLabel}` : '';
const margin = { top: 16, right: 100, bottom: 52 + (note ? 18 : 0), left: 62 };
const pw = Math.max(50, W - margin.left - margin.right);
const ph = Math.max(50, H - margin.top - margin.bottom);
const x = d3.scaleBand().domain(cats).range([0, pw]).padding(0.2);
const ymax = d3.max(pts, d => d.v);
const y = d3.scaleLinear().domain([0, ymax * 1.05]).nice().range([ph, 0]);
const g = svg.append('g').attr('transform', `translate(${margin.left},${margin.top})`);
g.append('g').selectAll('line').data(y.ticks(6)).join('line')
.attr('x1', 0).attr('x2', pw).attr('y1', d => y(d)).attr('y2', d => y(d))
.attr('stroke', fg).attr('stroke-opacity', 0.15);
const yAxis = g.append('g').call(d3.axisLeft(y).ticks(6).tickFormat(d => nf.format(d)));
const xAxis = g.append('g').attr('transform', `translate(0,${ph})`).call(d3.axisBottom(x));
g.selectAll('.domain, .tick line').attr('stroke', fg).attr('stroke-opacity', 0.5);
g.selectAll('.tick text').attr('fill', fg).attr('font-size', 11);
xAxis.selectAll('.tick').each(function (cat) {
d3.select(this).select('text')
.attr('class', 'd3-axis-filter')
.style('cursor', 'pointer')
.attr('data-row-idx', (rowIdxByCat.get(cat) || []).join(','));
});
g.append('text').attr('transform', 'rotate(-90)').attr('x', -ph / 2).attr('y', -margin.left + 14)
.attr('text-anchor', 'middle').attr('fill', fg).attr('font-size', 12).text(yLabel);
g.append('text').attr('x', pw / 2).attr('y', ph + 40).attr('text-anchor', 'middle')
.attr('fill', fg).attr('font-size', 12).text(xLabel);
if (note) {
g.append('text').attr('x', 0).attr('y', ph + 58).attr('fill', fg).attr('font-size', 10).text(note);
}
const tip = options.allowTooltips !== false ? d3.llmTooltip(container) : null;
const r = Math.max(2.5, Math.min(5, Math.sqrt(pw * ph / pts.length) / 3));
const bw = x.bandwidth();
const jit = i => {
const h = Math.sin(i * 12.9898) * 43758.5453;
return ((h - Math.floor(h)) - 0.5) * bw * 0.6;
};
const dots = g.append('g').selectAll('circle.d3-mark').data(pts).join('circle')
.attr('class', 'd3-mark')
.attr('data-row-idx', d => d.i)
.attr('cx', d => x(d.cat) + bw / 2 + jit(d.i))
.attr('cy', d => y(d.v))
.attr('r', r)
.attr('fill', color).attr('fill-opacity', 0.6)
.attr('stroke', color).attr('stroke-opacity', 0.9).attr('stroke-width', 0.5)
.style('cursor', 'pointer');
if (tip) {
dots.on('mousemove', (event, d) => {
const lines = [];
if (iId >= 0) lines.push(`<b>${d.row[iId]}</b>`);
lines.push(`${xLabel}: ${d.cat}`);
if (iTeam >= 0) lines.push(`Team: ${d.row[iTeam]}`);
if (iAge >= 0) lines.push(`Age: ${d.row[iAge]}`);
lines.push(`${yLabel}: ${nf.format(d.v)}`);
tip.show(lines.join('<br/>'), event);
}).on('mouseleave', () => tip.hide());
}
const ref = g.append('g').style('pointer-events', 'none');
ref.append('line').attr('x1', 0).attr('x2', pw).attr('y1', y(overallMed)).attr('y2', y(overallMed))
.attr('stroke', fg).attr('stroke-opacity', 0.7).attr('stroke-width', 1.5).attr('stroke-dasharray', '6,4');
ref.append('text').attr('x', pw + 6).attr('y', y(overallMed)).attr('dy', '0.35em')
.attr('fill', fg).attr('font-size', 11).text(`Median ${nf.format(overallMed)}`);
}
Keep going
- What a Strip plot is, and when to use one
- Selection explainer on the same data
- Beeswarm chart on the same data
- Box plot on the same data
- Histogram on the same data
- Parallel coordinates on the same data
- Regression plot (line with CI) on the same data
- Scatter plot on the same data
- Violin plot on the same data
This chart was made by RegiaBI from the data above. Get it for Power BI or see pricing.
New articles in your inbox
Drop your email and we'll tell you when we publish something new. No spam — unsubscribe anytime.