There's an easier way to get this into a chart than reading from a text 
file.  If you can get the output into a JSON string in the Visualization 
API DataTable's constructor 
format<https://developers.google.com/chart/interactive/docs/reference#dataparam>,
 
then you can call the perl script directly from an AJAX call and input the 
results into a DataTable.  Coding in perl isn't my strong suit, but it 
should work very similar to PHP, and you can see an example PHP script 
here<https://groups.google.com/d/msg/google-visualization-api/UdOFybnvFo0/wx_FK4fjh4AJ>;
 I 
think you want to replace the PHP associative arrays with hashtables in 
perl (and of course, you can ignore the database query in the PHP script), 
but that's basically what it should look like.

On Saturday, March 30, 2013 4:49:45 PM UTC-4, Cole Hoffele wrote:
>
> Yes it is dynamic. Essentially I have created a simulated 
> 'population'/Virtual City, that ive collected data from the internet. The 
> perl program randomizes the data, and spits out 'X' number of individuals 
> each with their own first name, last name, age, ethnicity etc. The X amount 
> of people varies based on the population you want to simulate. Now i need 
> to read in each of these lines and present it in multiple different graph 
> formats
>
> On Saturday, March 30, 2013 3:01:32 PM UTC-4, asgallant wrote:
>>
>> Does the perl script generate the file dynamically, or is this something 
>> you create once and want to read over and over again?
>>
>> On Saturday, March 30, 2013 2:39:42 PM UTC-4, Cole Hoffele wrote:
>>>
>>> As of right now, I have a perl application that reads in data files and 
>>> randomizes the data and produces an outpute file. Now my task is to take 
>>> that output file and display the contents of it in a graph form. We have 
>>> decided to use Google Charts to do so, but I dont know how to have Google 
>>> Charts read in the data file and produce graphs/charts from it.
>>>
>>> The output file is comma delimited and is thousands of lines long. 
>>> The output file looks similar to this:
>>>
>>>
>>> Cole,Hoffele,57,3,7,9
>>> John,Smith, 35,4,6,4
>>> Jane,Doe,64,1,0,6,2
>>>
>>> etc.
>>>
>>> If anyone could help me, and show me how to read in a txt file and use 
>>> these values and display it in a graph that would be wonderful! 
>>> Thank you!
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to