re-usable charting api, mapping to appropriate d3 api underneath