Skip to content

Dental chart ​

The 32 teeth in two arches, numbered, by state. Good for dental records and treatment plans.

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

In your framework

import { Chart } from 'nervure/react';

const spec = {
  type: 'dental',
  data: [
    { tooth: 16, state: 'filled' },
    { tooth: 26, state: 'crown' },
    { tooth: 36, state: 'filled', note: 'Check in 6 months' },
    { tooth: 46, state: 'root' },
    { tooth: 18, state: 'missing' },
    { tooth: 38, state: 'missing' },
    { tooth: 47, state: 'implant' },
    { tooth: 24, state: 'caries' },
    { tooth: 11, state: 'filled' },
  ],
};

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 dental takes:

/** Dental chart: the 32 teeth in two arches, numbered the FDI way (11 to 48), by state. */
interface DentalSpec extends Base {
  type: 'dental';
  /** Teeth not listed are healthy. */
  data: { tooth: number; state: ToothState; note?: string }[];
  labels?: Partial<Record<ToothState, string>>;
}

type ToothState = 'healthy' | 'caries' | 'filled' | 'crown' | 'root' | 'implant' | 'missing';

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