Class
caplin.chart.highchart

SeriesUtility

The class is still an Alpha release. It should only be used for experimental development as substantial changes may occur.
A utility class to manage some common operations on a HighChart series object.

Constructor Summary

Attributes Name and Description
caplin.chart.highchart.SeriesUtility(Object highChartSeries)

Constructs a new caplin.chart.highchart.SeriesUtility.

Method Summary

Attributes Name and Description
void addTicks(Array ticks)

Adds ticks to a HighChart series.

Object|null getPointByTimestamp(Number timestamp)

Finds a HighChart point object based on the timestamp.

void setPointValue(Object tick)

Adds a new point to a series or updates an existing one if it is already present on the series.

Constructor Detail

caplin.chart.highchart.SeriesUtility(Object highChartSeries)

Constructs a new caplin.chart.highchart.SeriesUtility.

Parameters
Object highChartSeries A HighChart series object.

Method Detail

void addTicks(Array ticks)

Adds ticks to a HighChart series. Note that you have to redraw the chart after calling this method if you want the chart to display new data.

Parameters
Array ticks An array of ticks in the Caplin chart format.

Object|null getPointByTimestamp(Number timestamp)

Finds a HighChart point object based on the timestamp.

Parameters
Number timestamp The timestamp to searh for.
Returns
{Object|null} Returns the point object if it finds it, otherwise null.

void setPointValue(Object tick)

Adds a new point to a series or updates an existing one if it is already present on the series. Note that you have to redraw the chart after calling this method if you want the chart to display new data.

Parameters
Object tick A series tick in the Caplin chart format.