You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to request the modeBarButtons.toImage function be expanded to include the current plot dimensions when creating the image.
modeBarButtons.toImage = {
name: 'toImage',
title: 'Download plot as a png',
icon: Icons.camera,
click: function(gd) {
var format = 'png'; var w = gd.offsetWidth;
var h = gd.offsetHeight;
Lib.notifier('Taking snapshot - this may take a few seconds', 'long');
if(Lib.isIE()) {
Lib.notifier('IE only supports svg. Changing format to svg.', 'long');
format = 'svg';
}
downloadImage(gd, {'format': format, **width: w, height: h**})
.then(function(filename) {
Lib.notifier('Snapshot succeeded - ' + filename, 'long');
})
.catch(function() {
Lib.notifier('Sorry there was a problem downloading your snapshot!', 'long');
});
}
};
Thanks
The text was updated successfully, but these errors were encountered:
I would like to request the modeBarButtons.toImage function be expanded to include the current plot dimensions when creating the image.
modeBarButtons.toImage = {
name: 'toImage',
title: 'Download plot as a png',
icon: Icons.camera,
click: function(gd) {
var format = 'png';
var w = gd.offsetWidth;
var h = gd.offsetHeight;
};
Thanks
The text was updated successfully, but these errors were encountered: