Beautiful API of Google Charts

I have never came across such an fantastic api design for any library. There are many excellent library out there but Google Charts is different. I am not a language designer nor an public api developer. Working with this open source library was mind blowing. Below are couple of instance where the interface worked exactly like I thought it should work.

First instance: While working with dashboard, I had control charts dependent on main control chart and it must control another chart. So the data to a control chart say “B” comes from “A” and data to a chart “C” comes form “B”. Also on load the data to chart “C” comes from “A” To accomplish this what I did was exactly mentioned above.

  • someObject.bind( “A” , [“B” , “C”] );
  • someObject.bind( “B” , “C”);

Second instance: While constructing a chart in the dashboard if we have one data source. For each charts we can define a view property to set the column index that will be sub data source for the chart.

Such clear, simple and elegance use of api makes me think of below advantage:

  1. Faster development time.
  2. Same level of class design across different kind of charts.
  3. Easy to hand over the technical knowledge across team.
  4. Highly maintainable code.
  5. Less code to write.

Happy Programming!

Advertisement

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: