Accepted answer

There's two ways to understand your question, and both involve very complex answers.

Choosing the right visualization

Whole books have been written on the topic. One of the best guides that I know of is SeeingData's Inside the Chart series. They have an article for each of the more common chart types (bar, pie or radar charts, scatterplots etc.), each detailing what you can see in it, what data it is for and what kind of information it can hide.

As a rule of thumb, if you have a lot of continuous data, like a time series, use a line chart. If you have few datapoints or the data is discrete, bar chart is there for you. Use stacked variants if you're presenting shares (although stacked line chart, or area chart tends to be hard to read). If presenting correlation, use a scatter plot. Changes and differences are best shown on a slope graph. Showing ratios of a single datapoint? If you have just two or three competing fields, use a pie chart, for more elements, a single stacked bar is usually a better choice.

There are more types of graphs, but unless your readers are adept in statistics, they probably won't be able to read them. Remember that it's your responsibility as an author to choose the correct graph type, which does not mislead the readers and which communicates the story of the data the best. Note that there might be more stories in one dataset, hence more graphs, more views of it.

A more general advice is: don't be creative. Good intentions (I want my chart to look cool) often lead to disasters, like this misleading Gun deaths in Florida chart. Just stick to the basics, don't do fancy faux 3D charts and let the data speak for themselves. As Edwart Tufte put it

Show data variation not just design variation

Choosing the right visualization library

Main factors are your requirements, complexity of the task and your coding skills. Google Charts is an online Excel, you click your mouse a couple of times and out comes a decent graph. However, your customization options are very limited, if you don't like the output, you'll have to look elsewhere.

D3.js on the other hand is a low-level tool with quite steep learning curve. It takes a better part of the day to make your first bar chart. Most important fact is, it's not a graphing library, it's data driven documents library. Yes, it does have some helper functions for graphs, but you have to construct them from scratch and it takes a lot of time and effort. You need to know your SVGs, HTML and CSS, as that's what you'll be manipulating. The reward is its extreme flexibility, you can make whole apps based on D3. With skill, it can completely replace jQuery. It's a lot more and a lot harder than a simple pie chart generator.

If a simple pie chart generator is what you want, but Google Charts don't offer the options you need, then the true graphing libraries like Highcharts are for you. They take data in a lot of formats, let you choose the basic output type (eg. pie vs. bar chart), do a little bit of customization and off you go. It's the middle ground.

I don't use the framework-specific libs like n3, Ember or Meteor charts, but I'd guess they fall closer to Highcharts than D3. Just check if all you need is to supply data and a configuration object, or if you're down to creating and setting up individual SVG DOM nodes.

Generally, if don't know what to choose, go from the least complex ones. Try to make it in Excel first. Then in Google charts. Then learn some JavaScript and try the Highcharts or your framework-specific library. And only if you still need more options go for the big guns like D3.

Related Query

More Query from same tag