From 8eb2a4b79119c2eca3facd7b2004dbef6f84ae50 Mon Sep 17 00:00:00 2001 From: Domino987 Date: Wed, 12 Jun 2019 21:51:45 +0200 Subject: [PATCH] Add toImageButtonOptions to config (#36144) * Add toImageButtonOptions to config This enables the user to customize the download as image button. * Fix to partial * Update index.d.ts * Update index.d.ts --- types/plotly.js/index.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts index 45c576c3d2..d962e05fe5 100644 --- a/types/plotly.js/index.d.ts +++ b/types/plotly.js/index.d.ts @@ -740,6 +740,15 @@ export interface Edits { } export interface Config { + /** override the defaults for the toImageButton */ + toImageButtonOptions: Partial<{ + filename: string; + scale: number; + format: 'png' | 'svg' | 'jpeg' | 'webp'; + height: number; + width: number; + }>; + /** no interactivity, for export or image generation */ staticPlot: boolean;