moving initAttr out of d3.chart constructor