简体   繁体   中英

ng2-charts : Newly added rows not getting displayed on phone devices

I have horizontal bar chart that takes a huge amount of data. Stack blitz link here . Problem is as I add more rows, only on phone layout the last few rows are not displayed. But it works fine on a desktop screen. I am dynamically increasing the chart parent divs height, could that be a problem?

Steps to reproduce the error

  1. Open the stackblitz link I have provided,
  2. Open the app in a different window
  3. Open developer tools
  4. Switch to phone device view mode
  5. add more rows

After a certain count, the rows are not displaying

Quick Answer: This happens because canvas gets overloaded with large number of rows. More on this in this thread . This is not an issue with the library.

As per my requirement, I have implemented pagination. I'm loading 10 rows at a time.

If Someone finds an actual solution for this requirement Kindly let me know.

There was a similar question on a vertical bar chart here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM