Solved

How to create nice looking bar graphs using a text file as input?

Posted on 2010-09-17
8
1,236 Views
Last Modified: 2012-05-10
How to create nice looking bar graphs using a text file as input?

Originally we'll have some raw data (results of calculations) in a two column table.
The idea is to use a text file with all these values, separated by commas, as input. The output would be bar graphs including title, in a picture format such as PNG or JPEG.

Can anyone recommend me any software or an easy way to implement this?
Thanks!
0
Comment
Question by:isoq
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 32

Expert Comment

by:phoffric
ID: 33699356
You have a text file where each row is of the form:data1,data2...If you have Microsoft Excel, then you can import this file as a Comma Separated Variable file, and the two text columns will fill into two Excel columns. From this you can create your nice bar graphs. You can then right click on the chart and copy and paste it into paint. Now you can save it in PNG or other formats.
0
 

Author Comment

by:isoq
ID: 33699467
Hi, Thanks.
Actually what I need is something that automatically use the CSV file as input, and create the picture as output.
Any idea?
0
 
LVL 6

Accepted Solution

by:
LeeeRussell earned 300 total points
ID: 33699502
You could automatically do this in Excel.  You could write a macro that will automatically generate a graph.  The macro you use will depend on how "Automatic" you require the process to be.

Microsoft have a set of pages on creating graphs in Excel using VBA:

http://msdn.microsoft.com/en-us/library/aa203725(office.11).aspx


If you really don't want to use Excel, the I suspect that there are graphing tools out there you could pay for that would take a CSV file as an input, but it's not an area I've ever investigated.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 32

Expert Comment

by:phoffric
ID: 33699541
Or, you can write a C/C++ program using OpenGL. Reading CSV file is easy.
0
 
LVL 34

Expert Comment

by:Norie
ID: 33709413
If you do want to use Excel the steps are pretty straightforward.

1 Open file.

2 Create chart using data from file as source.

3 Save file in required format.

All of this can be done in VBA, and can be as 'automatic' as you need/want.

It could also be done in a lot of other programming languages using the same basic algorithim.

Obviously you would need some sort of method of creating a chart but most languages have plenty of ways of dealing with file input/ouput.
0
 
LVL 8

Expert Comment

by:twohawks
ID: 33740403
I bet this would make a nice little php project (php bar graphs using GD).
Using PHP with your csv (flat file database) or  mySQL as the data container...
Create a form for input,
Use php to store info in csv or mySQL
Retrieve with php generating bargraph into web page.

Alternatively...
-------
It would undoubtably be something fun to do with Flash, but I have no suggestions for basis for going about it there.  
I think this might be something in that ilk though...
http://active.tutsplus.com/tutorials/xml/create-a-dynamic-bar-graph-generator-using-xml-as3/

------
Or how about Google Charts Tools ?? ;^)

Cheers ;^)
0
 
LVL 27

Expert Comment

by:CaptainCyril
ID: 33767659
If you can convert the file to a string then you can use this:

http://code.google.com/apis/chart/
0
 

Author Closing Comment

by:isoq
ID: 33802761
Good suggestion
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JavaScript interactive Japanese puzzle won't work 9 3,095
Very old computer game, what was it!!? 20 597
Finding direction of rotation 7 2,270
Air Filters 2 510
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
How many times a day do you open, acknowledge, or close an IT incident? What’s your process? Do you have a process depending on the incident, systems involved, and other factors? New Relic Alerts gives you options for how you interact with notifica…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question