2

I am working on an electron-angular project, In which I have to render four graphs one by one on the same screen. when the component loads you can see two of them on the screen and to see other graphs you have to scroll down the window. I've integrated hover effects and a legend box in every chart, when the component loads, the first two graph in the visible area, are properly working, all hover, zoom, and pan functionality is working fine but the zoom, pan hove effects are not working properly on other graphs which are not in visibility area at first.reference application's Image

1 Answers1

0

Which LightningChart JS version are you using?

I tried to reproduce the issue with v.3.4.0 but could not find such an issue. This could also be an Electron specific issue.

I'll attach my JavaScript code which I used for testing, maybe you could try to confirm your issue using that? You should be able to paste it in relatively easy using this template project: https://github.com/Arction/lcjs-typescript-example

const divFull = document.createElement('div')
document.body.append(divFull)
divFull.style.width = '100vw'
divFull.style.height = '160vh'
divFull.style.display = 'flex'
divFull.style.flexDirection = 'column'

const divs = new Array(4).fill(0).map((_, i) => {
    const div = document.createElement('div')
    divFull.append(div)
    div.style.flexGrow = '1'
    return div
})

// Approach 1, using Dashboard
const dashboard = lightningChart().Dashboard({ container: divFull, numberOfColumns: 1, numberOfRows: 4 })
for (let i = 0; i < 4; i += 1) {
    dashboard.createChartXY({ columnIndex: 0, rowIndex: i })
}

// Approach 2, using standalone Charts
// for (let i = 0; i < 4; i += 1) {
//     const chart = lightningChart().ChartXY({ container: divs[i] })
// }
Niilo Keinänen
  • 2,187
  • 1
  • 7
  • 12
  • Yes, I think It might be electron specific issue. but the same thing is happening with web browsers too. and the case is It will work with a minimal example but not with a fully-featured application. – Harsh Makwana Jun 07 '22 at 09:59
  • Any information like code samples, pictures, features used, UI frameworks used, etc. would be helpful in gaining more insight about this. Without any more specific information or issue reproduction I'm afraid there's nothing I can do to help on this. – Niilo Keinänen Jun 07 '22 at 11:42
  • Sure I can provide that, I've used Electron with Angular as a frontend framework. and features are like plot graphs on the same screen and the screen can be scrollable. but the issue is that while scrolling the screen, graph focus will sometimes get cleared and graphs become unresponsive and mouse events get turned off. we've tried another window instance in electron but the same thing happened. It's only working if we're loading the HTML with scripts in electron. – Harsh Makwana Jun 07 '22 at 12:50