Skip to content

charton API


charton API / @chart-on/ui / index / PrintPresetOptions

Interface: PrintPresetOptions ​

Defined in: ui/src/toolbar-presets.ts:329

Options for the print preset: the same as printChart takes.

Extends ​

Properties ​

annotations? ​

optional annotations?: boolean

Defined in: core/src/chart.ts:783

Include annotations: markers, price lines, trade lines and their axis labels. Default true.

Inherited from ​

ScreenshotPresetOptions.annotations


background? ​

optional background?: string

Defined in: core/src/chart.ts:789

What fills the image behind the chart: a CSS color, or 'transparent' for an image with an alpha channel (PNG or WebP; JPEG has none and shows black). Default: the theme background. A color the chart cannot read falls back to the theme background.

Inherited from ​

ScreenshotPresetOptions.background


caption? ​

optional caption?: string | boolean

Defined in: core/src/chart.ts:803

A header line above the chart. true: the symbol, the interval, the newest bar's values and the export time in the chart timezone. A string: that text instead. Default false.

Inherited from ​

ScreenshotPresetOptions.caption


crosshair? ​

optional crosshair?: boolean

Defined in: core/src/chart.ts:767

Include the crosshair and its labels. Default false.

Inherited from ​

ScreenshotPresetOptions.crosshair


drawings? ​

optional drawings?: boolean

Defined in: core/src/chart.ts:781

Include drawings. Default true.

Inherited from ​

ScreenshotPresetOptions.drawings


legend? ​

optional legend?: boolean

Defined in: core/src/chart.ts:765

Paint the series legend onto the image. Default: follows the legend feature flag.

Inherited from ​

ScreenshotPresetOptions.legend


padding? ​

optional padding?: number

Defined in: core/src/chart.ts:791

Empty margin around the chart in CSS pixels, filled with the background. Default 0.

Inherited from ​

ScreenshotPresetOptions.padding


scale? ​

optional scale?: number

Defined in: core/src/chart.ts:777

Image pixels per CSS pixel. Default: the device pixel ratio. Above it the chart is redrawn at this ratio for the capture and the screen is restored afterwards, so scale: 2 gives a sharp image from a standard display. Lowered so that no side exceeds 8192 pixels.

Inherited from ​

ScreenshotPresetOptions.scale


theme? ​

optional theme?: ChartTheme | "dark" | "light"

Defined in: core/src/chart.ts:798

Draw the image in another theme: a whole ChartTheme, or 'light' / 'dark' for the built-in light and dark themes with the chart's own fonts. The screen keeps its theme: the capture swaps it and puts it back in the same task, before the browser paints, also when drawing fails. No theme:change event is emitted. Default: the chart's theme.

Inherited from ​

ScreenshotPresetOptions.theme


watermark? ​

optional watermark?: boolean

Defined in: core/src/chart.ts:779

Include the watermark and the attribution (features.attributionLogo). Default true (they show when the chart shows them).

Inherited from ​

ScreenshotPresetOptions.watermark