Chart is not scrolling
If you run into the issue where you have a scrollable layout containing a chart, and the chart is not moving when scrolled, this happens because the chart is not aware that it is moving.
The solution to this problem is to add a scroll event handler to your scrollable DIV, and inform the chart(s) that they are moving.
// Example
div.onscroll = () => {
chart.engine.layout()
}
In React or other UI frameworks, you may not have access to a Chart object in this scenario, so you can also call layout on the LightningChart context, which affects all charts created using that context:
// Example 2
const lc = useContext(LCContext);
return (
<div
className="plots"
onScroll={() => {
lc?.layout();
}}
>
)