In the future we want geoChoroplethChart to default to the null (identity) projection since it is built on d3.geoPath which so defaults.
However we have the opportunity to get there in a backward-compatible way, with a deprecation warning.
Here's one way to get there:
- add a member
_projection, which defaults to undefined
- at the start of
doRender and doRedraw (maybe in a helper function)
if(_projection === undefined) {
console.warn('choropleth projection default of geoAlbers is deprecated');
_geoPath.projection(d3.geoAlbers());
} else {
_geoPath.projection(_projection);
}
geoChoroplethChart.projection becomes a regular getter/setter of _projection (note getter is currently broken)