Hi,
I’m running Grafana on a Raspberry PI 5, and I’m using grafana-image-renderer compiled from GitHub but I’d like to have the image renderized @2x by default.
I know nothing javascript but checking the files I went able to make it renderizing more long and large than default value (3000px) by editing maxWidth maxHeight
variables inside the file grafana-image-renderer/src/config/rendering.ts
export const defaultRenderingConfig: RenderingConfig = {
chromeBin: undefined,
args: ['--no-sandbox', '--disable-gpu'],
ignoresHttpsErrors: false,
timezone: undefined,
acceptLanguage: undefined,
width: 1000,
height: 500,
headed: false,
deviceScaleFactor: 1,
maxWidth: 30000, // from 3000
maxHeight: 30000, // from 3000
maxDeviceScaleFactor: 4,
pageZoomLevel: 1,
mode: 'default',
clustering: {
monitor: false,
mode: 'browser',
maxConcurrency: 5,
timeout: 30,
},
emulateNetworkConditions: false,
verboseLogging: false,
dumpio: false,
timingMetrics: false,
};
But if I change the other values like width, pageZoomLevel etc… and after I run again yarn run build
it keeps render image @1x and 1000px width even if I changed these values.
I also checked inside the grafana.ini but also changing
rendering_viewport_device_scale_factor =
to any value, recompiling and relaunching grafana-image-render and grafana-server… nothing changed again.
I know that I can write inside the url/query the scale factore but every time I want to render a panel using the share menu, I have to edit the url and render it again. It’s pretty annoying.
I hope there’s another way!
Thanks.