Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Chart doesn't display for zoom factor 90% in Chrome & Edge #3288

Closed
2 of 4 tasks
joecv opened this issue Mar 23, 2021 · 4 comments · Fixed by #3354
Closed
2 of 4 tasks

React Chart doesn't display for zoom factor 90% in Chrome & Edge #3288

joecv opened this issue Mar 23, 2021 · 4 comments · Fixed by #3354
Assignees
Labels
bug Chart The DevExtreme Reactive Chart component

Comments

@joecv
Copy link

joecv commented Mar 23, 2021

  • I have searched this repository's issues and believe that this is not a duplicate.

I'm using ...

  • React Grid
  • React Chart
  • React Scheduler

Current Behaviour

I have a bar chart (width=400, height=100) in a React function component where in I display dynamic data. The chart gets displayed correctly for the dimension (400*100) for any zoom factor other than 90%. For a zoom factor of 90% the chart does not get displayed in Chrome and Edge. On further debugging I found that chart library has an internal "isReadyToRenderSeries" check which returns false for a Zoom factor of 90% but true for a Zoom factor of 100%. This method in turn uses the getBoundingClientRect method, don't know whether that is causing the difference in behavior based on the change in the view-port in Chrome and Edge. I have read that the behavior of this method differs a bit between Firefox and Chrome.

The solution was to increase the height of the chart to 101 instead of 100 and that solved the issue, but I'm still not sure whether the new height of 101 will cause the same issue with any other zoom factor.

Expected Behaviour

The chart should be displayed correctly irrespective of its dimension, in all zoom factors across all browsers.

Steps to Reproduce

Link to the code sandbox that reproduces the issue can be found here.

  • Open the UI in a fresh window (use the 'Open in New Window' button to the right of the address bar)
  • Change the zoom factor of the new window to 90%
  • Refresh the page.

Screenshots

None

Environment

Windows 10
Visual Studio Code

  • dependencies
    • @devexpress/dx-react-chart: 2.7.4
    • @devexpress/dx-react-chart-material-ui: 2.7.4
    • @devexpress/dx-react-core: 2.7.4
    • @material-ui/core: 4.11.0
    • react: 17.0.1
    • react-dom: 17.0.1
    • react-scripts: 4.0.3
    • material-ui: none
  • devDependencies
    • @types/react: 17.0.0
    • @types/react-dom: 17.0.0
    • typescript: 4.1.3
@joecv joecv changed the title React Chart doesn't display for zoom factor 90% in Chrome & Edge React Chart doesn't display for zoom factor 90% in Chrome & Edge [Charts] Mar 29, 2021
@joecv joecv changed the title React Chart doesn't display for zoom factor 90% in Chrome & Edge [Charts] [Charts] React Chart doesn't display for zoom factor 90% in Chrome & Edge Mar 29, 2021
@joecv joecv changed the title [Charts] React Chart doesn't display for zoom factor 90% in Chrome & Edge React Chart doesn't display for zoom factor 90% in Chrome & Edge Mar 29, 2021
@LazyLahtak LazyLahtak added the Chart The DevExtreme Reactive Chart component label Apr 7, 2021
@joecv
Copy link
Author

joecv commented Apr 23, 2021

@LazyLahtak - Thanks for adding the tag Andrey.

@dccabs
Copy link

dccabs commented Apr 26, 2021

I'm having the same issue with a line series. depending on the viewing devices, it doesn't show up at various window sizes. Only when resizing does it seem to fix the issue.

@hitesh-s-simform
Copy link

Is there any update on this one?

@Krijovnick
Copy link
Contributor

@hitesh-s-simform

We are working on this issue. To fix this, we need to refactor our current implementation. This is a big task and we cannot give any estimates for when this fix will be introduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Chart The DevExtreme Reactive Chart component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants