factory graphs....

Public Forum open to all visitors.
Post Reply
User avatar
Sniper62
Site Admin
Posts: 2659
Joined: Sat Jun 19, 2004 4:38 am
Location: Alexandria, VA
Contact:

factory graphs....

Post by Sniper62 »

im having a problem. i am trying to make a chart from a game data XML file (wiretap) but i cannot figure out how to make the data integrate into the fusioncharts format.


the game XML format looks like this

Code: Select all

< ?xml version='1.0' encoding='ISO-8859-1'?>

< factorystats version='1.1' copyright='(C) Playnet Inc 2007, All rights reserved.'>

< generated date='2008-11-17 08:26:36' timestamp='1226931996'/>

< description>Campaign factory production stats

< factory id="70" from="1225582940" to="1226932940" ticks="1501" produced="1501"/>

< /factorystats>

but the fusioncharts format has to be this

Code: Select all

< graph caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' showNames='1' decimalPrecision='0' formatNumberScale='0'>

< set name='Jan' value='462' color='AFD8F8' />

< /graph>
also the file would need to update it self every 5mins or so.

there has to be a program or code out there that can go out, take certain data from an xml file and plug it into a certain format, right?


any suggestions?
Sniper62
CO RAF 617 Squadron "The DamBusters"
Image

My Movies: (youtube links, PM me if you are interested in higher res)-BARCAP in Action-Fighter Action-Fighter Action #2-Sniper of 09s-109f1vsSpitV
User avatar
Main4ce
Posts: 1919
Joined: Sun May 22, 2005 4:06 pm
Location: Gütersloh, NRW, West Germany
Contact:

Re: factory graphs....

Post by Main4ce »

I would PM killban if I was you....think you need Java script and I suck at that!
Main4ce
XO
RAF 617 Squadron "The DamBusters"

Moto: "After me the flood"

Image
Another Happy Bomber!
User avatar
Sniper62
Site Admin
Posts: 2659
Joined: Sat Jun 19, 2004 4:38 am
Location: Alexandria, VA
Contact:

Re: factory graphs....

Post by Sniper62 »

Main4ce wrote:I would PM killban if I was you....think you need Java script and I suck at that!
ya i have been PMing with him on the PS forums and all he really knows it Linux stuff and his stuff runs on linux, he doesnt really know how i can do it with windows :(
Sniper62
CO RAF 617 Squadron "The DamBusters"
Image

My Movies: (youtube links, PM me if you are interested in higher res)-BARCAP in Action-Fighter Action-Fighter Action #2-Sniper of 09s-109f1vsSpitV
User avatar
deffield
Posts: 224
Joined: Fri Mar 28, 2008 7:59 am
Location: Belfast, Northern Ireland

Re: factory graphs....

Post by deffield »

You can have it reload on page refresh with PHP or JS, personally I would run an updater in the background, writing the wiretap to MySQL and reading it from that.
Deffield
Pilot Officer
RAF 617 Sqn "The Dambusters"
Image
------
Axis response to 617 CAS
Image
User avatar
Sniper62
Site Admin
Posts: 2659
Joined: Sat Jun 19, 2004 4:38 am
Location: Alexandria, VA
Contact:

Re: factory graphs....

Post by Sniper62 »

deffield wrote:You can have it reload on page refresh with PHP or JS, personally I would run an updater in the background, writing the wiretap to MySQL and reading it from that.
hmmm ill have to look this up. any programs that would do that, that u know of?
Sniper62
CO RAF 617 Squadron "The DamBusters"
Image

My Movies: (youtube links, PM me if you are interested in higher res)-BARCAP in Action-Fighter Action-Fighter Action #2-Sniper of 09s-109f1vsSpitV
User avatar
deffield
Posts: 224
Joined: Fri Mar 28, 2008 7:59 am
Location: Belfast, Northern Ireland

Re: factory graphs....

Post by deffield »

I would write it in C# but Python or any other basic scripting language with SQL plugins available would work fine.
Deffield
Pilot Officer
RAF 617 Sqn "The Dambusters"
Image
------
Axis response to 617 CAS
Image
Post Reply