charton API / @chart-on/ui / index / ScreenshotPresetOptions
Interface: ScreenshotPresetOptions
Defined in: ui/src/toolbar-presets.ts:292
Options for the screenshot preset: the image options of chart.captureImage plus the downloaded file's name.
Extends
Properties
annotations?
optionalannotations?:boolean
Defined in: core/src/chart.ts:783
Include annotations: markers, price lines, trade lines and their axis labels. Default true.
Inherited from
background?
optionalbackground?: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
caption?
optionalcaption?: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
crosshair?
optionalcrosshair?:boolean
Defined in: core/src/chart.ts:767
Include the crosshair and its labels. Default false.
Inherited from
drawings?
optionaldrawings?:boolean
Defined in: core/src/chart.ts:781
Include drawings. Default true.
Inherited from
filename?
optionalfilename?:string| ((chart) =>string)
Defined in: ui/src/toolbar-presets.ts:294
File name; a function gets the chart. Default chart.png (or .jpg/.webp for those types).
legend?
optionallegend?:boolean
Defined in: core/src/chart.ts:765
Paint the series legend onto the image. Default: follows the legend feature flag.
Inherited from
padding?
optionalpadding?:number
Defined in: core/src/chart.ts:791
Empty margin around the chart in CSS pixels, filled with the background. Default 0.
Inherited from
quality?
optionalquality?:number
Defined in: core/src/chart.ts:771
Encoder quality from 0 to 1 for lossy types such as image/jpeg or image/webp.
Inherited from
scale?
optionalscale?: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
theme?
optionaltheme?: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
type?
optionaltype?:string
Defined in: core/src/chart.ts:769
Image MIME type passed to canvas.toBlob. Default: image/png.
Inherited from
watermark?
optionalwatermark?: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).