--- id: 5d8a4cfbe6b6180ed9a1c9f0 title: Part 19 challengeType: 0 dashedName: part-19 --- # --description-- You can't see it, but there is now an `svg` element nested in your dashboard container. When you appended it, it became the "selection" for this area of code. Any functions you chain after it will be used on this selection. `attr` is a function to set attributes. You need to pass it the attribute you want to set, and the value you want to give it. Here's an example of how to chain `attr` to a selection: ```js const variableName = d3.select('element') .append('element') .attr('attribute', 'value') ``` Chain an `attr` function to the selection that sets the `width` as the `svgWidth` variable you created earlier. When using a variable as a value, you do not need to put it in any kind of quotations. # --hints-- test-text ```js assert($('svg')[0].attributes.width.value === '700'); ``` # --seed-- ## --before-user-code-- ```html D3 Dashboard
``` ## --seed-contents-- ```html ``` # --solutions-- ```html ```