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:
- Faster development time.
- Same level of class design across different kind of charts.
- Easy to hand over the technical knowledge across team.
- Highly maintainable code.
- Less code to write.