Page 1 of 1

factory graphs....

Posted: Wed Nov 19, 2008 4:45 am
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?

Re: factory graphs....

Posted: Wed Nov 19, 2008 8:04 am
by Main4ce
I would PM killban if I was you....think you need Java script and I suck at that!

Re: factory graphs....

Posted: Wed Nov 19, 2008 7:49 pm
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 :(

Re: factory graphs....

Posted: Sun Nov 23, 2008 5:48 pm
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.

Re: factory graphs....

Posted: Mon Nov 24, 2008 5:05 am
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?

Re: factory graphs....

Posted: Mon Nov 24, 2008 10:42 am
by deffield
I would write it in C# but Python or any other basic scripting language with SQL plugins available would work fine.