selection.styles(values[, priority])
A convenience method on top of selection.style for setting multiple style properties. If the specified values is an object, the values may be specified either as strings or functions. For example:
selection.styles({fill: "red", stroke: function(d) { return d.stroke; }});
If a value is a constant, all elements are given the same style property value; otherwise, if a value is a function, the function is evaluated for each selected element, in order, being pas