new module:ct-chart /highchart /Series Utility(high Chart Series)
Constructs a new SeriesUtility
.
A utility class to manage some common operations on a HighChart series object.
Parameters:
Name | Type | Description |
---|---|---|
highChartSeries |
Object | A HighChart series object. |
Methods
add Ticks(periods, completion Callback) → {Boolean}
Adds periods to a HighChart series.
Parameters:
Name | Type | Description |
---|---|---|
periods |
Array | An array of periods in the Caplin chart format. |
completionCallback |
function | A function that runs once the periods have been processed. |
Returns:
Returns true
if the chart needs to be redrawn after calling this method,
false
otherwise.
- Type
- Boolean
get Point ByTimestamp(timestamp) → {Object|null|undefined}
Finds a HighChart point object based on the timestamp.
Note that if
dataGrouping is
enabled, or if the chart is zoomed or panned so that it's not showing the point being searched for, this won't
return the Point
object, even if it was returned in one of the previous calls to this method.
Parameters:
Name | Type | Description |
---|---|---|
timestamp |
Number | The timestamp to searh for. |
Returns:
If the Point object is found it will return it. If the HighChart series already
has a period with this timestamp, but hasn't yet created the Point object undefined
will be returned.
If however the timestamp is part of a new period, null
will be returned.
- Type
- Object | null | undefined
set Point Value(period Data) → {Boolean}
Adds a new point to a series or updates an existing one if it is already present on the series.
Parameters:
Name | Type | Description |
---|---|---|
periodData |
Object | A series period data in the Caplin chart format. |
Returns:
Returns true
if the chart needs to be redrawn after calling this method,
false
otherwise.
- Type
- Boolean