Is there any easy ways to use PHP to create Graphs and Charts?
Or are there any open-source solutions out there which have done the heavy-lifting and provide a platform where you can build your own Graphs & Charts?
It wouldn't be that hard to take a <div> and adjust its height and width based on values in your database, but I would think it would be murder to try and create your own axes, scales, labels, legends, etc from scratch?!
My needs are fairly simple. I just want to create basic things like Bar Charts, Histograms, Pie Charts and so on.
Why do you limit your options so much when asking questions?
1.) Because I associate JavaScipt with poorly planned and architected websites. It is a child's toy in most instances.
The more JS a site has, usually the more obnoxious it is....
2.) Because I despise Corporate America, and selling my soul to companies peddling proprietary software isn't my scene.
Almost everything I use is open-source or home-grown.
I might be more flexible on charting solutions, since that is an area which wouldn't be an effective use of my time "rolling my own". And yet at the same time, it is my experience that there are often solutions that meet my constraints and still deliver.
It is easy to follow the masses.
I choose something more noble in life...
Oh my, well you seem very opinionated and I'm unlikely to change your mind.
Dee, you should always be open to the fact that you could be wrong about these things, it's the only way to learn.
Check this for a popular choice...
Having an opinion that is different than yours doesn't make me wrong.
And I should be commended for taking the path any new web developer should, that being...
You can't build a viable web page or website without the former...
Obviously I won't change your mind on this topic, but I stand by my decisions.
Here are some promising sites I found last night...
But there's no reason to have charts at all! Surely a table would suffice?
The point is, charts are a better way to present data a lot of the time.
I'm not going to commend you for entirely dismissing an integral web technology while you tout it as something noble.
I've found server-side charting libraries don't give you the same level of control over the output as client-side ones do.
There's the obvious benefits of being able to render dynamic content and respond to user interaction, you might not "require" it but it can add a lot to the user experience. The reason you are providing charts at all over a table is because of user experience.
It's also good wherever possible to take processing off the server.
I've used pChart. I had to fix a couple of minor text positioning bugs (that were likely down to the fonts I was using) when I used it but it works very well. The code is a bit of a mess, but the charts it creates are very nice indeed!
1.) People changing the sequence FROM
Yes. After I am running a successful website and business, and I attempt to add that remaining 5-10% to my User's experience. Never forgetting... Horse then Cart...
How is the documentation?
What would I have to learn to start using it?
Do I need to know OOP or any special languages?
If I am going to break down and use someone else's code-base, then I want something easy and intuitive, otherwise I might as well build my own?!
Try telling that to Google.
Highcharts library is the best graphing library for the web that I'm aware of, and the amount of money they ask for their license is peanuts compared to the profits you can make by using it, and the amount of man-hours and skill that have been put into it.
Good luck finding a crappy solution to your problem.
What's wrong with having to know OOP?
The documentation is very good. There's an example script for pretty much any kind of chart you can think of. It's quite easy to get the hang of and all the data is fed into the charts using simple arrays-- easy to generate from queries and such.
It does use OOP but doesn't really follow a lot of the principles, it's really lacking on a sensible separation of concerns. It's procedural code in objects really. It's a bit messy, and from an idealogical point of view the code isn't very nice in places. That said, you won't need to touch the code much. If at all.
It is quite a large library, building a flexible charting library from scratch is a big job. If you're just building a one off chart of a specific type then it may be worth while. But pChart and such give the ability to quickly switch between a pie chart/bar chart etc with a single line of code.
On one hand, I can't compare it to any of the other libraries. On the other I can safely say I never felt the need to look for another one because pChart suited my needs perfectly.
I agree with this, I'm yet to dig into d3 but it seems to be gaining a lot popularity. The examples speak for themselves, it's quite powerful.
I don't mind people who are learning and have a positive attitude, but I can't stand [it when people go] around mocking [other] people.
I would suggest you give jpGraph a try. I've used it for many large graphing projects. You can use it to make about any graph type you can think of -- Line, Bar, pie, scatter, Impluse, Field, Splines, Geo Maps, Stock, Polar, Error, Balloon, Radar, Contour, and if you purchase the pro version you can also make barcodes among other graphs.
You can skin/theme each graph however you want. You have limitless control over the look and feel.
The documentation is extremely good. There are examples for every graph type, and more examples for graph variations/graph options. The API reference is very good, and the how-to reference does a good job at walking you through creating (and customizing) the different graphs step-by-step.
I've never encountered any real bugs in it either. I've never had to go edit the source code. It's a big library, but it's broken up into components so you can include only the functionality you need/want.
It's actually an easy mistake to make, git is best known for github and github is best known for open-source.
But, yes, we all have plenty to learn.
So we need to remain open and not be set in our ways.
You cannot give someone more tea if their teacup is already full.
next page →