Interface: IPositionLineAdapter
Charting Library.IPositionLineAdapter
An API object used to control position lines.
Methods
getBodyBackgroundColor
▸ getBodyBackgroundColor(): string
Get the body font of the position line.
Returns
string
getBodyBorderColor
▸ getBodyBorderColor(): string
Get the body border color of the position line.
Returns
string
getBodyFont
▸ getBodyFont(): string
Get the body font of the position line.
Returns
string
getBodyTextColor
▸ getBodyTextColor(): string
Get the body text color of the position line.
Returns
string
getCloseButtonBackgroundColor
▸ getCloseButtonBackgroundColor(): string
Get the close button background color of the position line.
Returns
string
getCloseButtonBorderColor
▸ getCloseButtonBorderColor(): string
Get the close button border color of the position line.
Returns
string
getCloseButtonIconColor
▸ getCloseButtonIconColor(): string
Get the close button icon color of the position line.
Returns
string
getCloseTooltip
▸ getCloseTooltip(): string
Get the close tooltip of the position line.
Returns
string
getExtendLeft
▸ getExtendLeft(): boolean
Get the extend left flag value of the position line.
Returns
boolean
getLineColor
▸ getLineColor(): string
Get the line color of the position line.
Returns
string
getLineLength
▸ getLineLength(): number
Get the line length of the position line.
Returns
number
getLineLengthUnit
▸ getLineLengthUnit(): PositionLineLengthUnit
Get the unit of length specified for the line length of the position line.
Returns
getLineStyle
▸ getLineStyle(): number
Get the line style of the position line.
Returns
number
getLineWidth
▸ getLineWidth(): number
Get the line width of the position line.
Returns
number
getPrice
▸ getPrice(): number
Get the price of the position line.
Returns
number
getProtectTooltip
▸ getProtectTooltip(): string
Get the protect tooltip of the position line.
Returns
string
getQuantity
▸ getQuantity(): string
Get the quantity of the position line.
Returns
string
getQuantityBackgroundColor
▸ getQuantityBackgroundColor(): string
Get the quantity background color of the position line.
Returns
string
getQuantityBorderColor
▸ getQuantityBorderColor(): string
Get the quantity border color of the position line.
Returns
string
getQuantityFont
▸ getQuantityFont(): string
Get the quantity font of the position line.
Returns
string
getQuantityTextColor
▸ getQuantityTextColor(): string
Get the quantity text color of the position line.
Returns
string
getReverseButtonBackgroundColor
▸ getReverseButtonBackgroundColor(): string
Get the reverse button background color of the position line.
Returns
string
getReverseButtonBorderColor
▸ getReverseButtonBorderColor(): string
Get the reverse button border color of the position line.
Returns
string
getReverseButtonIconColor
▸ getReverseButtonIconColor(): string
Get the reverse button icon color of the position line.
Returns
string
getReverseTooltip
▸ getReverseTooltip(): string
Get the reverse tooltip of the position line.
Returns
string
getText
▸ getText(): string
Get the text of the position line.
Returns
string
getTooltip
▸ getTooltip(): string
Get the tooltip of the position line.
Returns
string
onClose
▸ onClose(callback
): this
Attach a callback to be executed when the position line is closed.
Parameters
Name | Type | Description |
---|---|---|
callback | () => void | Callback to be executed when the position line is closed. |
Returns
this
▸ onClose<T
>(data
, callback
): this
Attach a callback to be executed when the position line is closed.
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
data | T | Data to be passed to the callback. |
callback | (data : T ) => void | Callback to be executed when the position line is closed. |
Returns
this
onModify
▸ onModify(callback
): this
Attach a callback to be executed when the position line is modified.
Parameters
Name | Type | Description |
---|---|---|
callback | () => void | Callback to be executed when the position line is modified. |
Returns
this
▸ onModify<T
>(data
, callback
): this
Attach a callback to be executed when the position line is modified.
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
data | T | Data to be passed to the callback. |
callback | (data : T ) => void | Callback to be executed when the position line is modified. |
Returns
this
onReverse
▸ onReverse(callback
): this
Attach a callback to be executed when the position line is reversed.
Parameters
Name | Type | Description |
---|---|---|
callback | () => void | Callback to be executed when the position line is reversed. |
Returns
this
▸ onReverse<T
>(data
, callback
): this
Attach a callback to be executed when the position line is reversed.
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
data | T | Data to be passed to the callback. |
callback | (data : T ) => void | Callback to be executed when the position line is reversed. |
Returns
this
remove
▸ remove(): void
Remove the position line. This API object cannot be used after this call.
Returns
void
setBodyBackgroundColor
▸ setBodyBackgroundColor(value
): this
Set the body font of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new body font. |
Returns
this
setBodyBorderColor
▸ setBodyBorderColor(value
): this
Set the body border color of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new body border color. |
Returns
this
setBodyFont
▸ setBodyFont(value
): this
Set the body font of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new body font. |
Returns
this
setBodyTextColor
▸ setBodyTextColor(value
): this
Set the body text color of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new body text color. |
Returns
this
setCloseButtonBackgroundColor
▸ setCloseButtonBackgroundColor(value
): this
Set the close button background color of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new close button background color. |
Returns
this
setCloseButtonBorderColor
▸ setCloseButtonBorderColor(value
): this
Set the close button border color of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new close button border color. |
Returns
this
setCloseButtonIconColor
▸ setCloseButtonIconColor(value
): this
Set the close button icon color of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new close button icon color. |
Returns
this
setCloseTooltip
▸ setCloseTooltip(value
): this
Set the close tooltip of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new close tooltip. |
Returns
this
setExtendLeft
▸ setExtendLeft(value
): this
Set the extend left flag value of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | boolean | The new extend left flag value. |
Returns
this
setLineColor
▸ setLineColor(value
): this
Set the line color of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new line color. |
Returns
this
setLineLength
▸ setLineLength(value
, unit?
): this
Set the line length of the position line.
If negative number is provided for the value and the unit is 'pixel' then the position will be relative to the left edge of the chart.
Parameters
Name | Type | Description |
---|---|---|
value | number | The new line length. |
unit? | PositionLineLengthUnit | unit for the line length, defaults to 'percentage'. |
Returns
this
setLineStyle
▸ setLineStyle(value
): this
Set the line style of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | number | The new line style. |
Returns
this
setLineWidth
▸ setLineWidth(value
): this
Set the line width of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | number | The new line width. |
Returns
this
setPrice
▸ setPrice(value
): this
Set the price of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | number | The new price. |
Returns
this
setProtectTooltip
▸ setProtectTooltip(value
): this
Set the protect tooltip of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new protect tooltip. |
Returns
this
setQuantity
▸ setQuantity(value
): this
Set the quantity of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new quantity. |
Returns
this
setQuantityBackgroundColor
▸ setQuantityBackgroundColor(value
): this
Set the quantity background color of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new quantity background color. |
Returns
this
setQuantityBorderColor
▸ setQuantityBorderColor(value
): this
Set the quantity border color of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new quantity border color. |
Returns
this
setQuantityFont
▸ setQuantityFont(value
): this
Set the quantity font of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new quantity font. |
Returns
this
setQuantityTextColor
▸ setQuantityTextColor(value
): this
Set the quantity text color of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new quantity text color. |
Returns
this
setReverseButtonBackgroundColor
▸ setReverseButtonBackgroundColor(value
): this
Set the reverse button background color of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new reverse button background color. |
Returns
this
setReverseButtonBorderColor
▸ setReverseButtonBorderColor(value
): this
Set the reverse button border color of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new reverse button border color. |
Returns
this
setReverseButtonIconColor
▸ setReverseButtonIconColor(value
): this
Set the reverse button icon color of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new reverse button icon color. |
Returns
this
setReverseTooltip
▸ setReverseTooltip(value
): this
Set the reverse tooltip of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new reverse tooltip. |
Returns
this
setText
▸ setText(value
): this
Set the text of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new text. |
Returns
this
setTooltip
▸ setTooltip(value
): this
Set the tooltip of the position line.
Parameters
Name | Type | Description |
---|---|---|
value | string | The new tooltip. |
Returns
this