简体   繁体   English

ng2-charts:新添加的行未显示在手机设备上

[英]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?我正在动态增加图表父 div 的高度,这可能是个问题吗?

Steps to reproduce the error重现错误的步骤

  1. Open the stackblitz link I have provided,打开我提供的 stackblitz 链接,
  2. Open the app in a different window在不同的 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.快速回答:发生这种情况是因为 canvas 因大量行而过载。 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.我一次加载 10 行。

If Someone finds an actual solution for this requirement Kindly let me know.如果有人找到此要求的实际解决方案,请告诉我。

There was a similar question on a vertical bar chart here . 这里的垂直条形图上有一个类似的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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