At Polychart we are passionate about visualizing data. This blog features product news, articles, as well as our own analyses and visualizations of datasets we find interesting.

Tuesday, 9 April 2013

Introducing Polychart.js Version 2

After a long wait, the version 2 of Polychart.js is finally here. We completely re-engineered and rebuilt Polychart.js, so that we can pack it with requested features that never made it to the original version of Polychart.js. As a result, this new version of Polychart.js is very, very different from the original charting library - so much that it has its own git repository. What can you expect from Polychart.js Version 2?

Flexible Grammar

Similar to the original Polychart.js, much of the design is inspired by The Grammar of Graphic and the R package ggplot2. However, instead of chart being specified in an object-oriented fashion, we've moved to using JSON to specify charts. This makes it a lot easier to save or serialize charts, and is a more natural workflow for JavaScript developers.

A True Interaction Model

The most highly requested Polychart.js feature was interaction, and so we built a flexible, event-based interaction model straight into Polychart.js. This is a truly unique feature of Polychart.js. When high level charting libraries call themselves "interactive", they typically refer to simple interactions like displaying tooltips on mouseover. Polychart.js's interaction model goes beyond that, allowing developers to create custom interactions, and even allowing multiple charts to interact with each other, like below (see code for these charts here).

Simple Data Aggregation

Polychart.js can perform simple data aggregation at the chart library (analogous to "statistics" in the Grammar of Graphics). This means that you don't need to write additional JavaScript code to do common aggregations:

Works Anywhere

Polychart.js uses Raphael.js internally for SVG rendering. Raphael.js falls back to VML in older Internet Explorer browsers, and still works on tablets. This means that your interactive charts can be viewed by almost anyone.

Fully Documented

The code is available on github, as is this wiki with the API reference and Getting Started guide. Examples are available on the Polychart.js website. As always, please email us if you have any questions and we would love to see the charts you've built!

No comments:

Post a Comment