c3js / c3

:bar_chart: A D3-based reusable chart library
http://c3js.org
MIT License
9.34k stars 1.39k forks source link

only skip animation if !isTabVisible, not the whole rendering #2671

Closed panthony closed 5 years ago

panthony commented 5 years ago

It fixes a regression introduced by f4a163f7128ed9218265ed9ce5163d758d604302 and closes #2533

codecov-io commented 5 years ago

Codecov Report

Merging #2671 into master will decrease coverage by <.01%. The diff coverage is 95.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2671      +/-   ##
==========================================
- Coverage   80.13%   80.12%   -0.01%     
==========================================
  Files          57       57              
  Lines        4520     4519       -1     
==========================================
- Hits         3622     3621       -1     
  Misses        898      898
Impacted Files Coverage Δ
src/core.js 90.11% <95.23%> (-0.02%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a4c971c...3b575d6. Read the comment docs.

panthony commented 5 years ago

Hum... I just saw this commit: 19a54ec413c5ae37ec4079c4303e38824a6fd967 but it did not fixed the issue for me.

The pies are here, the line's dot are here, but not the bars, not the lines.

if I click back on the tab, the focus event is not sent but document.hidden is false. If I click anywhere in the window when the focus event is sent.

I'm using Chrome 75.

Moreover, all my charts (and I mean several dozens) are now redrawn just because I switched tab which is annoying, I think i'll have to revert that part for me.