Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#906 Statistics : use Google Chart API

closed-accepted
5
2008-12-03
2007-12-14
Christophe B.
No

Statistics chart :
would be nice to replace jpgraph library
by Google Chart API calls.
http://code.google.com/apis/chart/

Discussion

  • Christophe B.
    Christophe B.
    2007-12-14

    Logged In: YES
    user_id=1006499
    Originator: YES

    Demo charts :

    Gender repartition :
    http://chart.apis.google.com/chart?cht=p3&chd=s:WhB&chs=300x110&chco=6666FF,FF6666,EEEEEE&chl=Male|Female|Unknown

    Age at death :
    http://chart.apis.google.com/chart?cht=lc&chs=600x120&chco=c0aa00&chtt=Age+at+death&chxt=x,y&chxl=0:|0|5|10|15|20|25|30|35|40|45|50|55|60|65|70|75|80|85|90|95|100|105|1:||15%20%&chd=t:20.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,20.0,0.0,20.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,20.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,40.0,0.0,0.0,20.0,20.0,0.0,20.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,20.0,20.0,0.0,20.0,0.0,0.0,0.0,0.0,20.0,20.0,20.0,0.0,20.0,0.0,20.0,20.0,20.0,40.0,60.0,60.0,20.0,0.0,20.0,0.0,20.0,0.0,60.0,0.0,0.0,20.0,0.0,20.0,0.0,60.0,40.0,20.0,0.0,100.0,80.0,40.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,20.0,20.0,0.0,0.0,0.0,20.0,0.0,0.0,0.0,20.0,0.0,0.0,0.0,0.0,0.0,0.0,0

     
  • Michael White
    Michael White
    2007-12-26

    Logged In: YES
    user_id=1383679
    Originator: NO

    I am working on this. You can see it in action at http://www.finison.com/phpgedview/statistics.php . Try the default values or choose age related to birth year. I will upload it once I've finished it.

     
  • kiwi_pgv
    kiwi_pgv
    2008-01-05

    Logged In: YES
    user_id=1910459
    Originator: NO

    Thats great - I was thinking of doing this as well - you beat me to it.

    Let me know if I can help with anything, especially testing on multiple GEDCOM's and the like.

    Any chance of getting an advance copy to play with? (just impatient!!)

    ps - I see the logic of starting from the existing statistics.php screen, but I suspect that can be improved on, in terms of ease of use, layout etc. Were you thinking of doing anything there?

     
  • Christophe B.
    Christophe B.
    2008-01-25

    Logged In: YES
    user_id=1006499
    Originator: YES

    New statistics blocks added to indilist :
    - Decade of birth
    - Decade of death
    - Age at death

    and to famlist :
    - Decade of birth
    - Decade of marriage
    - Age at marriage

     
  • kiwi_pgv
    kiwi_pgv
    2008-01-27

    Logged In: YES
    user_id=1910459
    Originator: NO

    opus27

    This is an intersting idea, and thanks for doing it - but I don't think the indilist is a good place to display this. Is it easy code to disable? Could it be optional. At the very least, colours etc need to be variable to match differeing themes.

    I much prefer the separate, and more flexible statistics chart page - but using the google api - as mike is experimenting with.

     
  • Christophe B.
    Christophe B.
    2008-01-29

    Logged In: YES
    user_id=1006499
    Originator: YES

    Thanks for your feedback.
    I have no time to do a better implementation at the moment.
    So I have hidden the code to disable this feature.

    functions_print_lists.php

     
  • kiwi_pgv
    kiwi_pgv
    2008-02-16

    Logged In: YES
    user_id=1910459
    Originator: NO

    Mike - do you have any further progress?

    Can I help at all. I really love top see this complete.

     
  • Michael White
    Michael White
    2008-02-16

    Logged In: YES
    user_id=1383679
    Originator: NO

    Sorry, I didn't see all of your comments. I haven't worked on it in a while. I hope to finish it up within the next week or so. If not, I will post what I have (it's nothing special, really; just requires becoming familiar with the chart api image request string, and I am not that experienced a programmer).

    Should it have the option of choosing either jpgraph or google maps?

     
  • kiwi_pgv
    kiwi_pgv
    2008-02-16

    Logged In: YES
    user_id=1910459
    Originator: NO

    <,Should it have the option of choosing either jpgraph or google?>>

    An interesting question. To use jpgraph requires downloading jpgraph and installing it - it isn't part of PGV, so some direct action is required.

    If, as I assume, you were going to post it as a Patch, then I see no need for a choice. Perhaps if someone chooses to integrate it fully into PGV, then perhaps, although I can't really see why you want want jpgraph when this is so much easier to use.

    So on balance my vote would be , no.

     
  • Greg Roach
    Greg Roach
    2008-03-31

    Logged In: YES
    user_id=1466942
    Originator: NO

    I've just found the commented-out code in the indi/fam list (I had to make a minor tweak to it as a result of some other changes.

    The graphs seem to work nicely.

    Perhaps (in terms of the GUI), we could turn them into popup windows (i.e. like the edit windows) - so you would click on the graph icon in the table footer to get the graph.

    I don't want to step on anybody's toes. Who "owns" this code?

     
  • kiwi_pgv
    kiwi_pgv
    2008-04-01

    Logged In: YES
    user_id=1910459
    Originator: NO

    Greg
    We've got two different things going on here.

    Christophe created the code in the indi/fam list.

    Mike (mikewhite314) raised the original idea and has created an alternative to the statistics file. This uses the google charts api, and is therefore much easier to install than the current version, as no extra software (jpgraph) is required. I ahve a copy and have been loking at it (its on mt site www.our-families.info if you want to have a look). I think though that the actual statistics selection section, which is still the old one could be improved. Other than that though it could be incorporated into the core.

    I like the idea of pop-up windows though as well.

     
  • Greg Roach
    Greg Roach
    2008-05-12

    Logged In: YES
    user_id=1466942
    Originator: NO

    pkellum's new stats library has a number of google chart options.

    If you ask him nicely, I'm sure he'll include any other charts you might want. The new stats class also takes parameters, so you should be able to do charts of a particular surname, place, etc.

     
  • Now the statistics chart use Google Chart API instead jpgraph

     
    • assigned_to: nobody --> wooc
     
    • status: open --> closed-accepted