Skip to main content

Interface: Mark

Charting Library.Mark

Properties​

borderWidth​

Optional

borderWidth: number

Border Width


color​

Color for the mark


customTooltip​

Optional

customTooltip: string

Trading Platform only. Optional content for a custom tooltip rendered by your own tv-custom-bar-mark custom element instead of the default text tooltip. The value is an opaque payload — typically a JSON string — that the library sets as the element's text content. It is never parsed as HTML by the library.

Register the element by loading a module via the custom_js_urls widget constructor option or the addCustomJSFile widget method. If the element is not registered, the default text rendering is used instead. See the Customize mark tooltips guide for more information.


hoveredBorderWidth​

Optional

hoveredBorderWidth: number

Border Width when hovering over bar mark


id​

id: string | number

ID of the mark


imageUrl​

Optional

imageUrl: string

Optional URL for an image to be displayed within the timescale mark.

The image should ideally be square in dimension. You can use any image type which the browser supports natively.

- `https://yourserver.com/adobe.svg`
- `/images/myImage.png`
- `data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3...`
- `data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4...`

label​

label: string

Label for the mark


labelFontColor​

labelFontColor: string

Text color for the mark


minSize​

minSize: number

Minimum size for the mark


showLabelWhenImageLoaded​

Optional

showLabelWhenImageLoaded: boolean

Continue to show text label even when an image has been loaded for the timescale mark.

Defaults to false if undefined.


text​

text: string

Text content for the mark


time​

time: number

Time for the mark. Unix timestamp in seconds.