New Charts, Features Join the Google Visualization API

Janet Wagner, Data Journalist / Full Stack Developer
Feb. 13 2014, 10:03AM EST

Google has released a new version of the Google Visualization API that features new chart types including sankey diagrams, calendar charts and annotation charts. The release also includes new features and improvements such as string to number conversion in datatables, the ability to export corecharts and geocharts as PNGs, and crosshairs for scatter, line and combo charts.

CodePen

See the Pen Google Interactive Stacked Column Chart by Janet Wagner (@WebCodePro) on CodePen.

It seems that Google has been increasing the effort in the development of Google Charts in recent months. The last three releases of the Google Visualization API have included new chart types as well as many new features and improvements. The Google Visualization API was even included in the Tech Talk session at last years' Google I/O developer conference. Mitchell Foley, Software Engineer on the Google Visualization API, gave a presentation that included demonstrations of the Timeline Chart, Scatter Chart, Bubble Chart and Geo Chart. The presentation also included examples of chart features such as Actions, Trend Lines and Map Projections. Mitchell Foley describes the purpose of the Visualization API in the presentation:

It's [Google Visualization API] actually a JavaScript API that is available for free for the public to use. It's not only used by customers outside of Google, you might want to use it on your personal website. But it's used by internal clients as well, like Google Docs, AdWords, AdSense, YouTube Analytics; we get a lot of customers inside Google. And what we want to do is we want to take your data, and we want to transform it into a beautiful visualization that you can use to tell your story.

ProgrammableWeb has published several articles featuring the Google Visualization API including the article "Google Visualization API Now Features Timeline Charts and Donut Charts" and the article "Three Techniques for Visualizing Data From Google BigQuery."

The new release of the Google Visualization API includes three new chart types; Annotation Charts, Calendar Charts, and Sankey Diagrams.

Annotation charts

Annotation Chart

Annotation Charts are generated using SVG/VML. They are line charts that support annotations and are used to display an interactive time series. It should be noted that the new Annotation Chart type is different than the annotations used in other types of Google charts. The API documentation provides a "confusion alert" that says:

"Currently, the Google Annotation Chart is distinct from the annotations that other Google charts (currently area, bar, column, combo, line, and scatter) support. In those charts, the annotations are specified in a separate datatable column, and displayed as short bits of text that users can hover over to see the full annotation text. In contrast, the Annotation Chart displays the full annotations on the right-hand side, as shown below."

Calendar charts

Calendar Chart

Calendar Charts are used to display a specific activity occurring over a long time span (usually months or years). Calendar Charts are currently in beta and may be significantly changed in future releases.

Sankey Diagrams

Sankey Diagram

A Sankey Diagram is a type of flow diagram that shows the "flow" from one set of data values to another. They are often used to depict energy transfers, material transfers or other flows within a system. Sankey Diagrams are also currently in beta and may undergo changes in future releases.

New features and improvements

The new API release includes several key new features and improvements including export of corecharts and geocharts as PNGs, crosshairs, and string to Number conversion.

It is now possible to export corecharts and geocharts as PNGs by using the getImageURI() function which generates a URI that allows modern browsers to render the chart image. The chart image URI can be placed directly in the browser address bar or a link to a printable chart can be created using JavaScript code.

Crosshairs for data points are now an available option of for scatter, line and area charts. Crosshairs are thin vertical and horizontal lines that can be displayed on focus and/or selection and allow chart users to target a specific data point on the chart.

String to number conversion is now possible in DataTable. When the column is set as numeric, strings included in the DataTable will be converted to numeric. The setCell() function can also be used to convert string to number on a cell that is specified as numeric.

November 2013 release

The November 2013 release of the Google Visualization API also featured the new chart types histograms, intervals, and diff charts. These type of charts are used to highlight the differences between two datasets.

Histogram Charts are similar to column charts and show the distribution of data. Numeric data is grouped together into bins (discrete intervals) to show how frequent the values fall into ranges or where the values are concentrated (the density of the data). The chart displays the bins as segmented columns and the number of bins are automatically generated.

Related Searches From ProgrammableWeb’s
Directory of More Than 10,000 APIs

Browse The Full Directory

Intervals are displayed around a series of data such as minimum and maximum values around a value and confidence intervals. There are currently six types of intervals available which include line, bar, box, stick, point, and area. Different intervals styles can be combined into one chart which allows for greater chart customization.

Diff Charts are used to show variations between two datasets. Two charts are created that highlight the differences between the data and a third chart "Diff Chart" is generated from the two charts which prominently displays the differences in the datasets. At this time of this writing, there are Diff Charts available for bar, column, pie, and scatter charts.

Conclusion

It appears that Google will be continuing to fully support the development of the Google Visualization API as it is used in several of the company's internal clients including Google Docs, AdWords, AdSense, and YouTube Analytics.

Mitchell Foley mentioned in his Google I/O presentation that Google is thinking about ADA compliance when it comes to visualization. He says that:

"There's actually some really exciting things that we're working on right now. They are not finished, but we are thinking about accessibility."

I'm looking forward to seeing the new features and improvements that will be made available in future releases of the Google Visualization API.

By Janet Wagner. Janet is a data journalist and full stack developer based in Toledo, Ohio. Her focus revolves around APIs, open data, data visualization and data-driven journalism. Follow her on Twitter, Google+ and LinkedIn.

Janet Wagner Janet is a data journalist and full stack developer based in Toledo, Ohio. Her focus revolves around APIs, open data, data visualization and data-driven journalism. Follow her on Twitter: @webcodepro and on Google+

Comments

User HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.