Skip to content

Audiogram ​

The softest sound heard at each pitch, by ear, over the bands of hearing loss. Good for hearing tests and audiology reports.

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

In your framework

import { Chart } from 'nervure/react';

const spec = { type: 'audiogram', right: [5, 5, 5, 20, 35, 50], left: [5, 5, 5, 15, 45, 60] };

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

/** Audiogram: the softest sound heard at each pitch, by ear, over the bands of hearing loss. */
interface AudiogramSpec extends Base {
  type: 'audiogram';
  /** Hertz; 250 to 8000 by default. */
  frequencies?: number[];
  /** Decibels (dB HL), one by frequency. */
  right: (number | null)[];
  left: (number | null)[];
}

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