GraphScatter

Import

svelte
import { GraphScatter } from 'markgraphy';

Basic usage

svelte
<GraphScatter
  title="example"
  cols={60}
/>

Props

PropTypeDefaultDescription
titlestringCaption drawn on the top edge as [ TITLE ].
dataScatterPoint[]Points to plot. x and y are real numbers; the plot scales them.
cols?number60Scene width in columns (excluding y-axis gutter). Default 60.
rows?number14Scene height in rows (excluding x-axis row and optional trend row). Default 14.
trend?booleanfalseRender a single-row linear trend strip below the plot. Default false.
animated?booleantrueAnimate the reveal. Default true. Reduced motion shows the full plot.
speedMs?number60Milliseconds between reveals of new points. Default 60.
label?string''Caption rendered muted under the plot.
class?string''

Exported types

  • ScatterPoint
  • GraphScatterProps

Reduced motion

Animation is disabled under prefers-reduced-motion.