mySelection.attr( name, value ) in D3.js
Set attribute to a value.
Arguments
name | type | description |
---|---|---|
name | String | |
value | String |
Non-string values (e.g. a number like 10 ) are coerced to strings before setting.
|
- Return Type
- Selection
Description
For more details see https://github.com/mbostock/d3/wiki/Selections#wiki-attr.
See Also
- Selection.attr(name)
- Selection.attr(name,func)
- Transition.attr(name,value)