Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LineChartRenderer

since

0.2.0

Hierarchy

  • AbstractRenderer
    • LineChartRenderer

Index

Constructors

constructor

Properties

background

background: HTMLCanvasElement = ...

environment

environment: Environment

Points to the Environment that this renderer is tied to. This is automatically set when the renderer is created.

height

height: number

metrics

metrics: Metric[] = ...

opts

opts: LineChartRendererOptions

t

t: number = 0

width

width: number

Methods

drawBackground

  • drawBackground(): void

metric

  • metric(key: string, opts?: MetricOptions): void

mount

  • mount(el: string | HTMLElement): void
  • Mount this renderer to a DOM element. Pass either a string representing a CSS selector matching the element or the element itself.

    // mounts the renderer to the element with the ID `container`
    renderer.mount('#container');
    
    // mounts the renderer to the element itself
    const container = document.getElementById('container');
    renderer.mount(container);
    

    Parameters

    • el: string | HTMLElement

    Returns void

render

  • render(): void

x

  • x(value: number): number

y

  • y(value: number): number

Generated using TypeDoc