![]() |
GoogleCharts
2 Attachment(s)
I've been playing with some Google Chart classes over the weekend and I've decided to give the code an early release to see what people think. It's all very basic still, I've mainly concentrated on implementing a flexible system, which I think I've achieved pretty well. I haven't done any performance tuning or anything (and there are a few places where performance improvements are obvious).
Have a play around, let me know what you think. I know there are a lot of improvements that can be made, and I'm eager to see everyones opinions. I don't mind a bit of criticism :-) There's an example included, but here's an example for the people who wanna see before downloading: PHP Code:
|
Great script Karl! It's just so advanced, I might have a good read-through :).
Thanks for sharing this with us! |
Yes it does use a lot of advanced theories and practices. Feel free to ask any questions and I'll do my best to answer them.
|
Nice scripts does, i might have to write a tutorial on writting them advance graphing in GD lol.
|
I'm assuming this is for greater flexibility, but why:
PHP Code:
|
Basically because I didn't want to mix presentation logic with the core class. Slight inconvenience, but I personally prefer it like this (a lot of other people follow this approach too).
|
Make sense.
I guess you then have the choice to give that image an id or class. Thanks. |
Why have you commented out the following line in your class constants?
php Code:
|
Here's a quicky on how to make a transparent backgroun: http://alblue.blogspot.com/2007/12/u...in-google.html
|
Quote:
|
Great! So it was you who make the first wraper for it!
What I don’t like about Google chart API is the fact axis don’t have nothing to do with values. Thus, in order for a simple x,y graph to make sense, you have to find the percentage of all your values and then plot them. I mean, if your max value is 150, you must make 150=100% and then calculate all values below it in terms of percentage. Your laber on the x axe will be 150, but your value will be 100%. Also: it does not work on forums with the [IMG] tag… It would be usefull for the PHP class to load the url as binary and outputs it as .png, so that it can be recognized everywhere. |
Aye, we made the first wrapper :-) and the BEST wrapper! Although I'd stick around as we'll be adding onto it constantly for the next few weeks.
|
Quote:
|
Hello! Any update?!
|
No update yet :-) You're going to have to wait a couple of weeks until Christmas period is over! Although Karl's done the extended stuff - not sure if he's released it yet.
What are you waiting on exactly, jaugusto? |
Thanks for the reply. Waiting on what I posted above ;)
The image generation(to use on forums) and the max value setting. Merry Cristmas and a Happy New Year, BTW. |
I'll get round to releasing an update sometime this week, thanks for checking it out.
|
Excellent script, thank you so much for creating it. It is extremely simple to understand and very expandable.
If anyone is having trouble trying to switch encoding on the chart data, there is a small bug that needs correction in the ./GoogleChart.php file. Function setDataEncoding is missing a "m_" before "szDataEnocding." An example of the fix is below. Code:
public function setDataEncoding($szEncoding = self::SIMPLE_ENCODING) |
Thanks for reporting that. I really should do some more work on this script, I promised jugusto I would release an update weeks ago.
|
I've just released v0.2. I would have liked to have spent more time on it but I', unfortunately extremely busy at the moment. Maybe some of our fellow coders can contribute? Failing that, you'll just have to bear with me and I'll try to get another release out within a month.
|
| All times are GMT. The time now is 08:17 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0