The information toggle web component <cq-info-toggle>.
Provides toggle management for the three-state heads-up display.
By default, the component toggles among three states: dynamic, static, and null (off).
States are changed using the cq-toggles attribute which can have any of the three toggle
values: dynamic, static, or null.
The component appends a cq-hu-dynamic or cq-hu-static element to the top node of the chart context if one is required and not already present.
The info toggle is mobile and crosshairs aware and can change the toggle state to accommodate both conditions; for example, if the crosshairs are active or the chart is on a mobile device, the component automatically makes the heads-up display static.
- Since:
-
7.5.0
Example
<cq-toggle
class="ciq-HU"
cq-member="headsUp",
cq-toggles="dynamic,static,null">
<span></span>
<cq-tooltip>Info</cq-tooltip>
</cq-toggle>
Methods
-
applyValues(channels)
-
Sets the toggle state to
staticif on a mobile device or the crosshairs are active. If on a mobile device and the toggle state isstatic, activates the crosshairs.Parameters:
Name Type Description channelsObject The web component communication channels.
- Since:
-
7.5.0
-
initInfoComponents(context)
-
Appends a cq-hu-dynamic or cq-hu-static element to the top node of the chart context if one is not already present.
Parameters:
Name Type Description contextCIQ.UI.Context The chart user interface context.
- Since:
-
7.5.0
-
setContext(context)
-
Adds the default markup. Sets the toggle tooltip. Subscribes to the
headsUpandcrosshairchannels. Appends a cq-hu-dynamic or cq-hu-static element to the top node of the chart context if one is not already attached.Parameters:
Name Type Description contextCIQ.UI.Context The chart user interface context.
- Since:
-
7.5.0
-
setTooltip(value)
-
Sets a tooltip on the toggle.
Parameters:
Name Type Description valueString The text of the tooltip, which is appended to the string "Info ". If a value is not provided, the tooltip is "Info off".
- Since:
-
7.5.0
