Charts / React science and statistics charts / Statistics
Agreement between two measurement methods: difference against mean with the bias, limits of agreement and their confidence bands, a tolerance zone and a marginal histogram.
React component BlandAltman, data through props. Uncertainty made visible: fits, intervals, survival and effect sizes. Tags: bland-altman, agreement, method-comparison, limits-of-agreement, bias, clinical, laboratory.
npm i klar-charts
import 'klar-charts/styles.css'
import { ThemeScope, BlandAltman } from 'klar-charts'
# or copy the source:
npx shadcn@latest add https://klar.run/r/sci-bland-altman.json<BlandAltman
pairs={hba1cPairs}
scale={scale}
height={450}
methodA="POC"
methodB="HPLC"
unit="mmol/mol"
format={(v) => v.toFixed(1)}
regression
tolerance={tolerances[scale]}
toleranceLabel={scale === 'difference' ? 'acceptable ±5 mmol/mol' : scale === 'percent' ? 'acceptable ±8%' : 'acceptable 0.92–1.08'}
/>