在Flex中逐行读取大型CSV文件

发布于 2024-09-26 08:59:10 字数 240 浏览 0 评论 0原文

我需要读取一个大型 CSV 文件 (8-15 MB) 并在 Flex AIR 中生成折线图。由于图表需要 XML 等结构化格式的数据。 当我读取 CSV 并将其转换为 XML 对象时,8 MB 文件大小变为 24 MB XML 对象并且无法绘制图表。

最好的解决方案是逐行读取,只读取部分数据。 我怎样才能在 Flex AIR 中实现这一目标? Flex 中可以逐行读取吗?

否则,使用大数据在 FLEX 中绘制图形的最佳方法是什么?

I need to read a large CSV file (8-15 MB) and generate a LineChart in Flex AIR. Since Chart need data in structurd format like XML.
When I read CSV and convert it to XML object 8 MB file size become 24 MB XML object and not able to graph.

Best solution is to read Line by line and read only part of data.
How can I acheive this in Flex AIR ? Is it possible to read line by line in Flex.

Otherwise what are the best ways to draw a graph in FLEX using large data.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

迷离° 2024-10-03 08:59:10

在这些图形 Flex 控件上传递非常大的数据将会很慢。正如您所说,最好在进行一些预处理后仅传递部分数据。目前尚不清楚您使用的是 Flex 还是 AIR...您是否有可用于分割数据的服务器端?

基于列表的控件中还有虚拟化的想法。我不确定它是否也适用于图表;可能值得检查。

Throwing very large data at these graphical Flex controls is going to be slow. It's better, as you say, to only pass part of the data after doing some preprocessing. It's not clear if you're using Flex or AIR... do you have a server side that you can use to dice the data?

There's also the idea of virtualization in list-based controls. I'm not sure if it applies to charts as well; probably worth checking.

人海汹涌 2024-10-03 08:59:10

将 CSV 文件转换为 AS 对象并使用它而不是 XML 不是更好吗?几乎可以肯定它会比 XML 文件小,并且渲染速度也可能快得多。

Would it not be better to convert the CSV file into an AS object and use that instead of XML? It's almost certainly going to be smaller than the XML file, and will probably render a lot quicker too.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文