Docs
katalyx.bio

Scatter charts

Points ringed in the card's surface, so dense clouds stay readable, on Recharts' ScatterChart. Fits carry their confidence band, the points that matter wear the same inverse pills as the rest of the charts, and one point at a time can be in focus with the readout above following it.

Install

npx shadcn@latest add @nelumbo/chart

Log axes and groups

scale="log" on both axes for quantities spanning orders of magnitude. Point at a gene, click to keep it, or tab to the chart and use the arrow keys; the readout starts on the correlation. Groups are separate Scatter series with a legend that toggles them.

Scatter Chart - Log axes

mRNA and protein copies per cell for 140 genes, both on log scales. Illustrative, after the shape of genome-wide measurements in mouse fibroblasts.

0.81Pearson r, mRNA against protein
Point at a gene, or tab here and use the arrow keys
mRNA copies per cellProtein copies per cell

Scatter Chart - Groups

Cell area against nuclear area from imaging, two cell lines (illustrative). Tap a chip to hide a line.

Cell area, µm²Nuclear area, µm²

Fit and band

chartLinearFit does least squares with a 95% confidence band for the line; draw the band as a range Area and the fit as a Line under the points. Here three samples are read off a standard curve; pick one to see its concentration.

Scatter Chart - Fit

A Bradford assay: BSA standards in triplicate, a least-squares line with its 95% confidence band, and three lysates read off the curve (illustrative).

0.988R², Standard curve
A595 = 0.00048 × µg/mL + 0.030
BSA, µg/mLA595

Volcano and bubble

The volcano colors only what passes both thresholds, red up and blue down, and names the strongest hits; the arrow keys walk the significant genes from the most significant. The bubble chart is an enrichment dot plot: ZAxis sets the dot area, and the tone of one hue carries the q-value.

Scatter Chart - Volcano

Differential expression under hypoxia (illustrative): fold change against significance. Dotted lines mark a twofold change and an adjusted p of 0.05; the strongest hits are named.

35genes changed, Hypoxia against normoxia
20 up, 15 down, of 670 measured
log₂ fold change−log₁₀ p

Scatter Chart - Bubble

Gene sets enriched among hypoxia-induced genes (illustrative). Dot size is the number of genes; a deeper tone is a smaller q-value.

Fold enrichmentq-value1e-21e-61e-12

Helpers

PropTypeDefaultNotes
chartPoint(key, { r, fill, bubble, opacity })Scatter shapeA dot ringed in the surface. fill picks a color per point; bubble takes the radius from the ZAxis area
chartLinearFit(points)ChartFitslope, intercept, r2, n, predict(x), band(x) for the 95% confidence band, rows(from, to, steps) for a Line and a range Area
ChartPointLabel{ x, y, text, side, tone }An inverse pill beside a point, in plot coordinates (from a Customized component's axis scales)
useChartFocus().preview(i)(index | null) => voidPreview a point on hover: Scatter's onMouseEnter and onMouseLeave, since scatter hover isn't tied to the tooltip index