new PlotComplementer(params)
Creates an add-on that enables a series to complement another series.

The complementary series is a permanent fixture of the series which it complements. It moves in tandem with the series, and gets removed with the series. In all other respects, though, it behaves like its own series. It shows separately in the panel legend and plots using its own renderer.
Charts can have multiple PlotComplementer instances. Each instance is attached to the chart
engine as a member of a PlotComplementer collection.
Multiple PlotComplementer instances can be associated with a time series. To link a
PlotComplementer to a series, specify the series instrument in the params.filter function.
See setQuoteFeed.
Note: The series created by this add-on is not exported with the layout, since it is created in tandem with the series it complements. Currently, this feature works only with non-comparison series.
Requires addOns.js.
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
object | Configuration parameters. Properties
|
- Since:
-
7.3.0
Example
Forecasting
let forecaster = new CIQ.PlotComplementer({
stx: stxx,
id: "forecast",
quoteFeed: fcstFeed.quoteFeedForecastSimulator,
behavior: { refreshInterval: 60 },
decorator: { symbol: "_fcst", display: " Forecast" },
renderingParameters: { chartType: "channel", opacity: 0.5, pattern: "dotted" },
});
Methods
-
resetRenderingParameters()
-
Resets the
PlotComplementerrendering values to the default settings.Default settings can be provided in the parameters passed to the
PlotComplementerconstructor. If no settings are provided to the constructor,PlotComplementeruses the following defaults:{ chartType:"line", width:1, opacity:0.5 }.The rendering parameters may be set anytime after creating
PlotComplementer; for example, to set an ad-hoc rendering right before adding a series.- Since:
-
7.3.0
-
setQuoteFeed(params)
-
Sets a quote feed for the
PlotComplementer.Automatically called when a quote feed is provided in the constructor argument. If a quote feed or
behaviorobject is not specified inparams, this function returns without doing anything.Parameters:
Name Type Description paramsobject Configuration parameters.
Properties
Name Type Argument Description quoteFeedobject Quote feed to attach to the quote driver to satisfy any quote requests for any series created by the add-on. This quote feed is like any time series quote feed object. See the Data Integration Overview.
behaviorobject Behavior for the quote feed supplied in this parameter list. This object is like any
behaviorobject associated with a quote feed. See CIQ.ChartEngine#attachQuoteFeed for more information onbehaviorobjects.filterfunction <optional>
Filters the quote feed supplied in this parameter list. The filter function takes as an argument an object typically containing
symbolObject,symbol, andintervalproperties. The properties associate thePlotComplementerwith an instrument. If thefilterfunction returns true, thePlotComplementerquote feed is used for the instrument.This
filterfunction is like thefilterin basic quote feeds. See CIQ.ChartEngine#attachQuoteFeed for more information on quote feedfilterfunctions.- Since:
-
7.3.0
