Skip to content

Commit

Permalink
Set plotGlPixelRatio to 2x the scale factor
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease committed Feb 27, 2021
1 parent 0fa6083 commit 42234c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions repos/kaleido/js/src/plotly/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ module.exports = {

mathJaxConfigQuery: '?config=TeX-AMS-MML_SVG',

// config option passed in render step
plotGlPixelRatio: 2.5,

// time [in ms] after which printToPDF errors when image isn't loaded
pdfPageLoadImgTimeout: 20000
}
8 changes: 4 additions & 4 deletions repos/kaleido/js/src/plotly/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ function render (info, mapboxAccessToken, topojsonURL) {

// Use parsed export request
info = parsed.result;
const figure = info.figure
const format = info.format
const encoded = info.encoded
const figure = info.figure;
const format = info.format;
const encoded = info.encoded;

// Build default config, and let figure.config override it
const defaultConfig = {
mapboxAccessToken: opts.mapboxAccessToken || null,
plotGlPixelRatio: opts.plotGlPixelRatio || cst.plotGlPixelRatio
plotGlPixelRatio: info.scale * 2
}
if (opts.topojsonURL) {
defaultConfig.topojsonURL = opts.topojsonURL
Expand Down

0 comments on commit 42234c3

Please sign in to comment.