Skip to content

Blood pressure chart ​

Readings on the grid of blood pressure categories, from normal to crisis. Good for home monitoring, check-ups and patient apps.

The smallest code that works. change the code, then press Run

In your framework

import { Chart } from 'nervure/react';

const spec = {
  type: 'bloodpressure',
  data: [
    { label: '1 Mar', systolic: 136, diastolic: 82, pulse: 73 },
    { label: '4 Mar', systolic: 125, diastolic: 79, pulse: 74 },
    { label: '8 Mar', systolic: 126, diastolic: 76, pulse: 66 },
    { label: '11 Mar', systolic: 135, diastolic: 85, pulse: 62 },
    { label: '15 Mar', systolic: 125, diastolic: 77, pulse: 78 },
    { label: '18 Mar', systolic: 117, diastolic: 74, pulse: 72 },
    { label: '22 Mar', systolic: 128, diastolic: 79, pulse: 74 },
    { label: '25 Mar', systolic: 128, diastolic: 80, pulse: 70 },
    { label: '29 Mar', systolic: 115, diastolic: 70, pulse: 72 },
  ],
};

export default function Example() {
  return <Chart spec={spec} style={{ height: 340 }} />;
}

Or import this chart alone: what each import weighs.

Options

Beside the fields shared by every chart (title, format, heading, export…), type bloodpressure takes:

/** Readings placed on the grid of blood pressure categories: normal, elevated, stage 1, stage 2, crisis. */
interface BloodPressureSpec extends Base {
  type: 'bloodpressure';
  data: BloodPressureReading[];
  /** Name of each category in another language, from normal to crisis. */
  labels?: string[];
}

interface BloodPressureReading {
  label: string;

Style it

  • Colours: theme.palette, chart.setColor(name, colour), or --nervure-palette in your CSS. More
  • Marks: [data-series="name"], parts: [data-part="axes"], legend, series. What you change is kept in exports.
  • Movement: animation: false draws at once. More
  • Files: chart.download('png'), svg, csv. More

Close to it