Class SmoothieChart

Initialises a new SmoothieChart.

Options are optional and may be sparsely populated. Just specify the values you need and the rest will be given sensible defaults.

Index

Constructor methods

Methods

Constructor methods

constructor(chartOptions?: IChartOptions): SmoothieChart

Parameters

Returns

SmoothieChart

Methods

public addTimeSeries(series: TimeSeries, seriesOptions?: ITimeSeriesPresentationOptions)

Adds a TimeSeries to this chart, with optional presentation options.

Parameters

public bringToFront(timeSeries: TimeSeries)

Brings the specified TimeSeries to the top of the chart. It will be rendered last.

Parameters

public getTimeSeriesOptions(timeSeries: TimeSeries): ITimeSeriesPresentationOptions

Gets render options for the specified TimeSeries.

As you may use a single TimeSeries in multiple charts with different formatting in each usage, these settings are stored in the chart.

Parameters

Returns

ITimeSeriesPresentationOptions

public removeTimeSeries(series: TimeSeries)

Removes the specified TimeSeries from the chart.

Parameters

public render(canvas?: HTMLCanvasElement, time?: number)

Parameters

  • canvas?: HTMLCanvasElement optional
  • time?: number optional

public start()

Starts the animation of this chart. Called by streamTo.

public stop()

Stops the animation of this chart.

public streamTo(canvas: HTMLCanvasElement, delayMillis?: number)

Instructs the SmoothieChart to start rendering to the provided canvas, with specified delay.

Parameters

  • canvas: HTMLCanvasElement

    the target canvas element

  • delayMillis?: number optional

    an amount of time to wait before a data point is shown. This can prevent the end of the series from appearing on screen, with new values flashing into view, at the expense of some latency.

public updateValueRange()