You can trigger Karax to redraw when the window size changes with something like:
proc onResize(ev: Event) =
# maybe do something with display width, e.g. using document.body.clientWidth
redraw()
window.addEventListener("resize", onResize)
You might want to debounce this to avoid triggering a lot of redraws while the user changes the window size
The Karax eCharts experiment provides MWE similar to what I might create, so I won't re-paste here unless that is preferrable.
https://github.com/pragmagic/karax/tree/master/experiments
Images resize without issue when the window is changed.
In the past when I've used echarts and regular javascript I did something like this:
window.addEventListener('resize', function(){
chart1.resize();
})
Is is possible to translate this into Karax or is a different approach required?