Skip to content

charton API


charton API / @chart-on/core / index / WatermarkOptions

Interface: WatermarkOptions ​

Defined in: packages/core/src/watermark.ts:40

Options for a watermark: its text lines and image, position and margin, colour, opacity and font.

Properties ​

anchor ​

anchor: WatermarkAnchor

Defined in: packages/core/src/watermark.ts:69


author ​

author: string

Defined in: packages/core/src/watermark.ts:48

A line above the others, e.g. the user's name, so it stays while follow replaces lines. Plain text, trimmed and cut to 40 characters; empty adds no line.


authorSize ​

authorSize: number | null

Defined in: packages/core/src/watermark.ts:52

Size of the author line in css px; null: half of fontSize.


color ​

color: string | null

Defined in: packages/core/src/watermark.ts:73

Text color; defaults to the theme's watermark token.


fontFamily ​

fontFamily: string | null

Defined in: packages/core/src/watermark.ts:79

Defaults to the theme's font.


fontSize ​

fontSize: number

Defined in: packages/core/src/watermark.ts:77

Default font size of the lines, in css px.


image ​

image: CanvasImageSource | null

Defined in: packages/core/src/watermark.ts:66

Image drawn above the text (a logo, say). Loading images are drawn once loaded.


imageSize ​

imageSize: { height: number; width: number; } | null

Defined in: packages/core/src/watermark.ts:68

Image size in css px; defaults to its natural size.


lines ​

lines: (string | WatermarkLine)[]

Defined in: packages/core/src/watermark.ts:43

Text lines, top to bottom.


lineSizes ​

lineSizes: (number | null)[]

Defined in: packages/core/src/watermark.ts:58

Sizes of lines by position, in css px, over each line's own size; a missing or null entry keeps it. They outlast follow replacing the lines, so [40, 18] sizes the symbol and interval lines of symbolWatermarkLines.


logo: boolean

Defined in: packages/core/src/watermark.ts:64

Draw the project mark above the image and text, in the text colour.

Deprecated ​

The chart shows its attribution as a corner badge (features.attributionLogo) and no longer sets this. It is removed in 0.3.


margin ​

margin: number

Defined in: packages/core/src/watermark.ts:71

Distance from the plot edges in css px (for anchors other than center).


opacity ​

opacity: number

Defined in: packages/core/src/watermark.ts:75

Multiplies the color's own alpha. Images use it times the color's alpha.


visible ​

visible: boolean

Defined in: packages/core/src/watermark.ts:41