Interface LogoWatermarkOptions

interface LogoWatermarkOptions {
    background?: string;
    borderColor?: string;
    fontSize?: number;
    height?: number;
    href?: string;
    id?: string;
    image?: CanvasImageSource & { width: number; height: number; };
    label?: string;
    labelColor?: string;
    margin?: number;
    opacity?: number;
    padding?: number | { x: number; y: number };
    position?: WatermarkPosition;
    radius?: number;
    revealSeconds?: number;
    src?: string;
    tint?: string;
    utmCampaign?: string;
    utmMedium?: string;
    zOrder?: ZOrder;
}

Properties

background?: string

Rounded plate behind the mark and label. Without one the wording sits straight on the candles and is unreadable wherever the chart is busy. Defaults to a translucent form of the theme background; 'none' omits it.

borderColor?: string

Plate border. Defaults to the theme's axis line. 'none' omits it.

fontSize?: number

Label size in media px. Default 12.

height?: number

Rendered logo height in px; width follows the source aspect. Default 28.

href?: string

Where the mark points. A canvas cannot hold an anchor, so this only marks it as clickable — the hit reports a pointer cursor, and the host opens href from its own click handler.

Given a bare URL, href() appends UTM parameters naming the page the chart is embedded in, so the referral is attributable. Pass a URL that already has a query string to compose your own and skip that entirely.

id?: string

Hit-test id, so the chart can report hover. Default watermark.

image?: CanvasImageSource & { width: number; height: number; }

A preloaded image/bitmap to draw (skips loading).

label?: string

Text revealed to the right of the mark on hover — "Chart by OpenAlgo". The mark alone is what sits on the chart at rest; the wording is only needed when someone looks at it, so it unrolls rather than occupying the corner permanently. Omit for a plain, non-interactive mark.

labelColor?: string

Label colour. Defaults to tint, then the theme's text.

margin?: number

Gap from the plot edges in px. Default 12.

opacity?: number

0..1. Default 0.7.

padding?: number | { x: number; y: number }

Plate padding around the lockup, in media px. A number pads both axes; { x, y } pads them separately. Default { x: 7, y: 4 }, which keeps the revealed label clear of the plate edge.

Use it to size the resting plate exactly: a 40px mark with padding: 2.5 sits in a 45x45 square. The plate widens as the label unrolls; the padding is what stays constant.

Corner (or center) to anchor to. Default bottom-right.

radius?: number

Plate corner radius in media px. Default 6.

revealSeconds?: number

Reveal duration in seconds. Default 0.18.

src?: string

Image URL or data URI. Ignored when image is provided.

tint?: string

Recolor the opaque pixels to this color (e.g. a faint theme gray).

utmCampaign?: string

utm_campaign for the composed link. Default oac-chart.

utmMedium?: string

utm_medium for the composed link. Default oac-link.

zOrder?: ZOrder

Layer order vs the series. Default top.