new Markers(context, params)
UI Helper for managing the 'Events' menu drop down for showing markers on the chart.
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
CIQ.UI.Context | The context |
||||||||||||||||||||
params |
Object | initialization parameters Properties
|
- Since:
-
7.1.0
Methods
-
showMarkers(node, type, markerType)
-
Displays the markers of the type indicated or removes them all. Updates display state of menu items
Must be called from a menu item.
To use, first create the methods for managing the markers:
var markerImplementation=new MarkersSample(stxx);
Inside the
startUI
function add this line ( See sample-template-advanced.html for exact placement ):var UIMarkers=new CIQ.UI.Markers(UIContext, {menuItemSelector:".stx-markers cq-item", implementation:markerImplementation});
markerImplementation should include showMarkers function which should accept the following parameters:
- type : primary type of marker, such as: circle, square or of a specialized type such as: trade, video etc. if type parameter is not provided all currently displayed markers are removed
- renderType : a secondary marker type
A full implementation of the
MarkersSample
class can be found in theexamples/markers
directory.Parameters:
Name Type Description node
HTMLElement type
String marker type (Circle, Square, Callout)
markerType
String Class of marker to draw (Simple or Performance)
- Since:
-
7.1.0 Adds
markerType
.
Example
<cq-item stxtap="Markers.showMarkers('square')"> Simple Square <span class="ciq-radio"> <span></span> </span> </cq-item>