ABTSoftware / SciChart.JS.Examples

MIT License
80 stars 37 forks source link

unstable and duplicated charts in app #11

Closed puremood2002 closed 3 years ago

puremood2002 commented 3 years ago

Hi

I managed to integrate scichart.js into my react app using typescript. The app use several components, each creates a scichart. Running the app I see very unstable outcome: sometimes all charts draw but they are all duplicated (I have 5 components, 4 of them display lines, another display scatter) -all charts shown as line charts, or sometimes all charts shown as scatter charts; even sometimes only one chart shows up. I just shared my repository with you (with your username - scichart), my username is puremood2002, repository is "scichart-react-typescript" .

Please advise, thanks.

klishevich commented 3 years ago

Hi @puremood2002 could you please also share this repo with me (klishevich) as I am the one who is responsible for SciChart.js library in SciChart organization.

puremood2002 commented 3 years ago

Hi I just added you, please let me know if you get it, thanks.

klishevich commented 3 years ago

@puremood2002 thank you for finding the bug :) which manifested itself when several charts were initialized in parallel. The problem is fixed in version 1.0.1247, please run npm i scichart@1.0.1247 and check.

puremood2002 commented 3 years ago

thank you very much. Using 1.0.1247 the problem is gone. But I got another problem: I added "Add Chart" function which you can invoke by clicking the "Add" button in my app, a new component is created correctly, but the chart surface is not rendering - I am testing with chart type of Scatter so when you add the new chart you select type "scatter" in UI. I updated code so every time my scatter chart component is created, the div that hosts scichartsurface has a random id, the code execution get into initChart function but the surface does not appear in this component. I pushed my latest code to the same repository. Please advise. thanks.

klishevich commented 3 years ago

@puremood2002 I fixed the issue for bubble and line charts, checkout my last commit in your repository

puremood2002 commented 3 years ago

thanks a lot, it is resolved!