new CurveEdit( [node], context [, params])
UI Helper for cross section curve interaction by means of context menu options.
When the enableTimeSeries
property of the plugins.crossSection
object in the chart
configuration object is set to true, users can right‑click data points on the curve to
open a context menu:
If Launch Time Series is then selected, a time series chart for that instrument opens in a new browser tab.
When the enableToggleLabel
property of the plugins.crossSection
object in the chart
configuration object is set to true, users can right‑click data points on the curve to
open a context menu which will allow toggling of the label.
See the context menu markup example below.
For information about the plugins.crossSection
configuration object, see the
Chart Configuration tutorial.
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
node |
HTMLElement |
<optional> |
context.topNode | Automatically attaches to the top node of the context. Not currently used. |
context |
CIQ.UI.Context | The context for the chart. |
||
params.enableTimeSeries |
boolean |
<optional> |
false | Specifies whether an option to link to a time series chart should appear when right-clicking on a point on the chart. |
params.enableToggleLabel |
boolean |
<optional> |
false | Specifies whether an option to show a label above the point on the chart when right-clicking on a point on the chart. |
params.timeSeriesSymbologyEncoder |
function |
<optional> |
CIQ.Market.Symbology.encodeTermStructureInstrumentSymbol | Function that converts an instrument to a market ticker. Takes an |
params |
object |
<optional> |
{pathToTimeSeries:"plugins/crosssection/sample-time-series-instant-chart.html"} | Provides the path to a template used by the launchTimeSeries method to load a time series chart. |
- Since:
-
- 7.4.0
- 8.3.0 Added the
timeSeriesSymbologyEncoder
parameter. TheenableTimeSeries
property of theplugins.crossSection
object in the chart configuration object overrides thecq-time-series
attribute of thecq-curve-context
element. - 8.5.0 Added the
enableToggleLabel
parameter.cq-time-series
attribute decommissioned.
Example
<cq-dialog>
<cq-curve-context>
<div stxtap="CurveEdit.toggleLabel()">Toggle Label</div>
<div stxtap="CurveEdit.launchTimeSeries()">Launch Time Series</div>
</cq-curve-context>
</cq-dialog>
Methods
-
launchTimeSeries()
-
Opens a window and loads a time series chart for a selected cross section instrument.
- Since:
-
7.4.0
-
toggleLabel()
-
Shows or hides a label for a selected cross section instrument.
- Since:
-
8.5.0