views:

64

answers:

2

Hi,

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.

+1  A: 

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.

Assaf Lavie
I am using Flex AIR and no webserice concept. CSV file lies on hard drive.
FlexJogger
A: 

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.

Gregor Kiddie