UNPKG

agentscape

Version:

Agentscape is a library for creating agent-based simulations. It provides a simple API for defining agents and their behavior, and for defining the environment in which the agents interact. Agentscape is designed to be flexible and extensible, allowing

34 lines (33 loc) 713 B
import { Color } from '../numbers'; export interface DatasetOptions { label: string; color?: Color; } export interface ChartConstructor { root: HTMLElement; datasets: DatasetOptions[]; axisLabels?: { x: string; y: string; }; title?: string; width?: number; } /** * Creates an X-Y scatter plot. */ export default class ScatterPlot { private chart; private width; constructor(opts: ChartConstructor); /** * Pushes an array of data point arrays to the chart. * * The ith array of points corresponds to the ith dataset * defined for the chart. */ pushData(data: { x: number; y: number; }[][]): void; }