gVis - Google Visualization Library |
[eluser]whobutsb[/eluser]
Hello CI community. You guys have been great to me over the year, I've accomplished some great stuff using CI and your help on the forums. Thank you all! So I felt like its time to give back. Here is my contribution: gVis - a Google Visualization Library. Google visualizations is an amazing free tool released by Google. I use it for almost all of my charting and visualizations. My goal with gVis is to make it as easy to use as the CI table library. Its definitely a rough start but I think its pretty handy, and I hope that you will find it useful as well. Comments and suggestions are always appreciated, and if you have any improvements please share them with me, because I would love to make this a full fledged CI library. Here is the wiki to the Visualization gVis - Google Visualization Library I'm by no means a JS or PHP ninja, but I have a solid understanding on how Google Visualizations and CI work so if you run in to trouble I might be of assistance. Cheers, Steve
[eluser]mattthehoople[/eluser]
Cool. I've been trying to use flot over the past couple of weeks to provide nice interactive graphs, but this looks a pretty good alternative at first glance. Did you consider flot, or rapheal as an alternative? Do you have any working demos anywhere we could see? Other than googles demos that is...
[eluser]whobutsb[/eluser]
I've worked with a couple of other Flash/PHP charting tools in the past, but none of them really stuck with me or they usually cost money for the more extended features. I started to use gVisualizations because my director would always come up to me and say "wouldn't it be cool if we had the Google Finance annotated time line on so and so", he would usually throw out ideas and I would try to make them work. The nice thing about Google Visualizations is it well maintained, there are lots of charts, graphs, and maps to choose from, and the data inputs are the same across all of the visualizations, lots of of configuration options, and its free to use! (Thats considering you don't mind your numbers being sent to Google, *puts on tinfoil hat*). I don't have any live examples just yet. Most of my work is on the intranet, on private databases. But pretty soon I'll put together a Demo page. Thanks for the comments!
[eluser]mattthehoople[/eluser]
Excellent stuff. I guess I've never had any need to look at google finance before (being skint!). Cheers.
[eluser]hugle[/eluser]
never heard about this one... but thanks for sharing it - bookmarked
[eluser]whobutsb[/eluser]
Quote:Hi, Yes you can minus the animation part of it. Here is a code snippet of how I would do it Code: $this->load->library('gvis'); There are some more parameters you would need to add in order to make it exactly like the one you have but this I think is fairly close. Here is an image of the output: http://i.imgur.com/8iqpQ.jpg
[eluser]naim[/eluser]
Your snippet works great but.. Code: $this->load->library('gvis'); the var dump of $row shows: Code: object(stdClass)[18] The votes are String but i cast them to integer Your code shows me the chart, mine - shows me nothing What i did wrong? \\ EDIT I think that the problem is in add_row . What problem - have no idea but when i'm adding the values manualy like add_row('X', 8); it works.
[eluser]whobutsb[/eluser]
Morning, Can you send me what is outputted when you use Code: $this->gvis->generate() Also I would install firebug, it will help you find errors that the Google Visualization JS Library is throwing. Another good tool is google visualization playground, which can be found here: http://code.google.com/apis/ajax/playgro...ualization
[eluser]naim[/eluser]
I don't know why - but now it works Damn.. I ran the site, checked out, and see a beautiful chart |
Welcome Guest, Not a member yet? Register Sign In |