API Reference
Namespaces
Classes
Events
Global
Externals

Class: shape

CIQ.Drawing. shape ()


new shape()

shape is a default implementation of a CIQ.Drawing.BaseTwoPoint drawing which places a "shape" on the canvas. It can be rotated and/or stretched. It is meant to be overridden with specific shape designs, such as arrows....

Since:
  • 2015-11-1
  • 9.7.0 Deprecated
Deprecated:
  • Yes

Members


setRotationOnInitialDraw :boolean

If true, enables rotation when the drawing is initially drawn.

Type:
  • boolean
Since:
  • 7.4.0
  • 9.7.0 Deprecated
Deprecated:
  • Yes

Methods


adjust()

Since:
  • 9.7.0 Deprecated

Deprecated:
  • Yes

click(context, tick, value)

Parameters:
Name Type Description
context external:CanvasRenderingContext2D

Canvas context

tick number

Tick, represents x position

value number

Prive/value, represents y position

Since:
  • 9.7.0 Deprecated

Deprecated:
  • Yes
Returns:

Success

Type
boolean

intersected(tick, value, box)

Parameters:
Name Type Description
tick number

Tick, represents x position

value number

Prive/value, represents y position

box object

Square area represented by x and y coordinates in which the shape is searched

Since:
  • 9.7.0 Deprecated

Deprecated:
  • Yes
Returns:

An object that contains information about the intersection. This object is passed back to CIQ.Drawing.reposition when repositioning the drawing. Return false or null if not intersected. Simply returning true highlights the drawing.

Type
object | undefined

littleCircleRadius()

Since:
  • 9.7.0 Deprecated

Deprecated:
  • Yes
Returns:

3

Type
number

measure()

Since:
  • 9.7.0 Deprecated

Deprecated:
  • Yes

reconstruct(stx [, obj])

Reconstruct a shape.

Parameters:
Name Type Argument Description
stx CIQ.ChartEngine

The chart object.

obj object <optional>

A drawing descriptor.

Properties
Name Type Argument Description
col string <optional>

The border color.

fc string <optional>

The fill color.

pnl string <optional>

The panel name.

ptrn string <optional>

Pattern for line "solid", "dotted", or "dashed". Defaults to solid.

lw number <optional>

Line width. Defaults to 1.

v0 number <optional>

Value (price) for the center point.

d0 number <optional>

Date (string form) for the center point

tzo0 number <optional>

Offset of UTC from d0 in minutes.

a number <optional>

Angle of the rotation in degrees.

sx number <optional>

Horizontal scale factor.

sy number <optional>

Vertical scale factor.

fld string <optional>

Field to which drawing is associated.

ver number <optional>

Version number of the shape.

prm number <optional>

Whether the drawing is permanent

hdn number <optional>

Whether the drawing is hidden

Since:
  • 8.4.0 Added fld property to obj parameter.
  • 9.0.0 Added prm and hdn property to obj parameter.
  • 9.7.0 Deprecated
Deprecated:
  • Yes

render(context)

Parameters:
Name Type Description
context external:CanvasRenderingContext2D

Canvas context

Since:
  • 9.7.0 Deprecated

Deprecated:
  • Yes

reposition(context, repositioner, tick, value)

Parameters:
Name Type Description
context external:CanvasRenderingContext2D

Canvas context

repositioner object

Collection of parameters related to repositioning the drawing

tick number

Tick, represents x position

value number

Prive/value, represents y position

Since:
  • 9.7.0 Deprecated

Deprecated:
  • Yes

serialize()

Since:
  • 9.7.0 Deprecated

Deprecated:
  • Yes
Returns:

Serialized drawing parameters

Type
object