Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Feb 2005
    Posts
    663
    Thanks
    5
    Thanked 14 Times in 14 Posts

    Help Creating Chart

    Hi

    I have a basic understanding of php, but unfortunately, thats about as far as my abilities run thus far. I'm taking at look at php/swf charts from Here, and I'm trying to create a bar chart based on some information that is generated from 3rd party software.

    The software uses a template, that will then create what I believe are arrays. The small sample of the code being generated from the 3rd party sofware looks like this:

    Code:
    define ("XX0","PLAYER");
    define ("XX1","FLM_ID");
    define ("XX2","NFL_ID");
    define ("XX3","PRO_TEAM_ID");
    define ("XX4","PRO_TEAM");
    define ("XX5","CONTRACT_YEARS");
    define ("XX6","SALARY");
    define ("XX7","INJURY");
    define ("XX8","SEASON_SCORE");
    define ("XX9","BYEWEEK");
    define ("XXA","LINK");
    define ("XXB","CLASS");
    define ("XXC","PPG");
    define ("XXD","GAMES_PLAYED");
    define ("XXE","RANK");
    
    define ("XC0","POSITION");
    define ("XC1","POSITION_FULLNAME");
    define ("XC2","CONFERENCE");
    
    define ("XY0","C1_TEAM_ID");
    define ("XY1","C2_TEAM_ID");
    define ("XY2","C3_TEAM_ID");
    define ("XY3","C4_TEAM_ID");
    define ("XY4","C1_TEAM_ABBREVIATION");
    define ("XY5","C2_TEAM_ABBREVIATION");
    define ("XY6","C3_TEAM_ABBREVIATION");
    define ("XY7","C4_TEAM_ABBREVIATION");
    
    define ("XP0","WEEK_1_POINTS");
    define ("XP1","WEEK_2_POINTS");
    define ("XP2","WEEK_3_POINTS");
    define ("XP3","WEEK_4_POINTS");
    define ("XP4","WEEK_5_POINTS");
    define ("XP5","WEEK_6_POINTS");
    define ("XP6","WEEK_7_POINTS");
    define ("XP7","WEEK_8_POINTS");
    define ("XP8","WEEK_9_POINTS");
    define ("XP9","WEEK_10_POINTS");
    define ("XPA","WEEK_11_POINTS");
    define ("XPB","WEEK_12_POINTS");
    define ("XPC","WEEK_13_POINTS");
    define ("XPD","WEEK_14_POINTS");
    define ("XPE","WEEK_15_POINTS");
    define ("XPF","WEEK_16_POINTS");
    define ("XPG","WEEK_17_POINTS");
    
    define ("XS0","WEEK_1_STATUS");
    define ("XS1","WEEK_2_STATUS");
    define ("XS2","WEEK_3_STATUS");
    define ("XS3","WEEK_4_STATUS");
    define ("XS4","WEEK_5_STATUS");
    define ("XS5","WEEK_6_STATUS");
    define ("XS6","WEEK_7_STATUS");
    define ("XS7","WEEK_8_STATUS");
    define ("XS8","WEEK_9_STATUS");
    define ("XS9","WEEK_10_STATUS");
    define ("XSA","WEEK_11_STATUS");
    define ("XSB","WEEK_12_STATUS");
    define ("XSC","WEEK_13_STATUS");
    define ("XSD","WEEK_14_STATUS");
    define ("XSE","WEEK_15_STATUS");
    define ("XSF","WEEK_16_STATUS");
    define ("XSG","WEEK_17_STATUS");
    
    $report_gen  = "Thu 06/02/2005 10:25 AM";
    $rs6_version = "Kappa 10-1 (6.10.10.1)";
    $league_name = "FreedFFL";
    $report_unix = "1117704324";
    
    $template->assign_block_vars ('Statistics', array());
    $template->assign_block_vars ('Statistics.Position', array(
    	XC0 => "QB",
    	XC1 => "Quarterbacks",
    	XC2 => ""
    ));
    $template->assign_block_vars ('Statistics.Position.Player', array(
    	XX0 => "Manning, Peyton",
    	XX1 => "3291",
    	XX2 => "12531",
    	XX3 => "1",
    	XX4 => "IND",
    	XX5 => "0",
    	XX6 => "0.00",
    	XX7 => "",
    	XX8 => "430",
    	XX9 => "6",
    	XXA => "http://www.sportsline.com/nfl/players/playerpage/12531",
    	XXB => "1",
    	XXC => "28.67",
    	XXD => "15",
    	XXE => "001",
    	XY0 => "14",
    	XY1 => "0",
    	XY2 => "0",
    	XY3 => "0",
    	XY4 => "Bastards",
    	XY5 => "",
    	XY6 => "",
    	XY7 => "",
    	XP0 => "20",
    	XP1 => "20",
    	XP2 => "41",
    	XP3 => "18",
    	XP4 => "22",
    	XP5 => "#",
    	XP6 => "32",
    	XP7 => "48",
    	XP8 => "31",
    	XP9 => "42",
    	XPA => "27",
    	XPB => "35",
    	XPC => "30",
    	XPD => "22",
    	XPE => "16",
    	XPF => "26",
    	XPG => "",
    	XS0 => "",
    	XS1 => "",
    	XS2 => "",
    	XS3 => "",
    	XS4 => "",
    	XS5 => "",
    	XS6 => "",
    	XS7 => "",
    	XS8 => "",
    	XS9 => "",
    	XSA => "",
    	XSB => "",
    	XSC => "",
    	XSD => "",
    	XSE => "",
    	XSF => "",
    	XSG => "",
    ));
    $template->assign_block_vars ('Statistics.Position.Player', array(
    	XX0 => "Culpepper, Daunte",
    	XX1 => "3875",
    	XX2 => "133263",
    	XX3 => "23",
    	XX4 => "MIN",
    	XX5 => "0",
    	XX6 => "0.00",
    	XX7 => "",
    	XX8 => "428",
    	XX9 => "4",
    	XXA => "http://www.sportsline.com/nfl/players/playerpage/133263",
    	XXB => "2",
    	XXC => "28.53",
    	XXD => "15",
    	XXE => "002",
    	XY0 => "15",
    	XY1 => "0",
    	XY2 => "0",
    	XY3 => "0",
    	XY4 => "RoadKill",
    	XY5 => "",
    	XY6 => "",
    	XY7 => "",
    	XP0 => "40",
    	XP1 => "23",
    	XP2 => "33",
    	XP3 => "#",
    	XP4 => "50",
    	XP5 => "42",
    	XP6 => "13",
    	XP7 => "15",
    	XP8 => "16",
    	XP9 => "35",
    	XPA => "22",
    	XPB => "20",
    	XPC => "25",
    	XPD => "19",
    	XPE => "41",
    	XPF => "34",
    	XPG => "",
    	XS0 => "",
    	XS1 => "",
    	XS2 => "",
    	XS3 => "",
    	XS4 => "",
    	XS5 => "",
    	XS6 => "",
    	XS7 => "",
    	XS8 => "",
    	XS9 => "",
    	XSA => "",
    	XSB => "",
    	XSC => "",
    	XSD => "",
    	XSE => "",
    	XSF => "",
    	XSG => "",
    ));
    If you noticed, this is some NFL football information that includes a NFL Player ID (number), name, as well as there weekly scores. My goal is to create a script that will search the entire file for either the player number or name, and then returned the chart of the weekly points for that player. If someone can help me in setting up the chart, and what the array should like. I think I can then set the template in the third party software to correctly give me that information.

    I hope I explained that well enough. Or if anyone has any suggestions or how to do it better, it would be great.

    Thanks
    pt

  • #2
    New to the CF scene
    Join Date
    Oct 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here is list of PHP graphic software.
    Highly recommend jpgraph and phplot.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •