Class: Performance

CIQ.Marker. Performance

new Performance(params)

Constructor for high performance canvas markers.

Use this class if you need to add hundreds or thousands of markers to your chart at once for better performance. When the marker is created it will create a node from the built in template but not attach the node until you hover over the canvas drawing. Once you intersect the drawing, the node will be appended and you can interact with it like other markers.

The canvas will draw the marker based on the classes that you append to the template (which come from the params.type and params.category) being added to stx-marker class. See CIQ.ChartEngine#calculateMarkerStyles for more information.

This class takes the same params as CIQ.Marker.Simple so that the appended DOM marker works the same. This means that you can reuse all of the default styles you've created for CIQ.Marker.Simple with CIQ.Marker.Performance. Be aware that if you do not pass in a headline or story your marker will display a blank text box when you click it just like a CIQ.Marker.Simple does.

Currently the only yPositioner supported by this marker is "above_candle"

See Markers tutorials for additional implementation instructions.

Name Type Description
params Object

Parameters to describe the marker

Name Type Argument Default Description
type string

The marker type "circle", "square", "callout" to be drawn.

headline string <optional>

The headline text to pop-up when clicked.

category string <optional>

The category class to add to your marker. Default categories are: "news", "earningsUp", "earningsDown", "dividend", "filing", "split"

displayCategory boolean <optional>

Set to false to not draw the first letter of the category in the marker.

story string <optional>

The story to pop-up when clicked. If left undefined the marker will display an empty DOM node when clicked.

color string <optional>

Background color to make your marker. Overrides any style set by params.category.

displayStem boolean <optional>

Set to false to draw the marker at a specific point and not include the stem.

  • 7.1.0
var dataSegment = this.stx.chart.dataSegment;
var story="Like all ChartIQ markers, the object itself is managed by the chart.";
var qt = OHLCData;
new CIQ.Marker({
	stx: this.stx,
	label: "trade",
	xPositioner: "date",
	x: qt.DT,
	node: new CIQ.Marker.Performance({
		type: "circle",
		displayStem: false,
		headline: "Executed at $"+qt.Close,
		story: story