--- id: 587d7fa9367417b2b2512bcf title: Dynamically Change the Height of Each Bar challengeType: 6 forumTopicId: 301486 localeTitle: Динамическое изменение высоты каждой панели --- ## Description
Высота каждой панели может быть установлена ​​на значение точки данных в массиве, подобно тому, как значение x было задано динамически.
selection.attr ("свойство", (d, i) => {
/ *
* d - значение точки данных
* i - индекс точки данных в массиве
* /
})
## Instructions
Измените функцию обратного вызова для атрибута height чтобы вернуть значение времени данных 3. Примечание.
Помните, что умножение всех точек данных на одну и ту же константу масштабирует данные (например, масштабирование). Это помогает увидеть различия между значениями бар в этом примере.
## Tests
```yml tests: - text: The first rect should have a height of 36. testString: assert($('rect').eq(0).attr('height') == '36'); - text: The second rect should have a height of 93. testString: assert($('rect').eq(1).attr('height') == '93'); - text: The third rect should have a height of 66. testString: assert($('rect').eq(2).attr('height') == '66'); - text: The fourth rect should have a height of 51. testString: assert($('rect').eq(3).attr('height') == '51'); - text: The fifth rect should have a height of 75. testString: assert($('rect').eq(4).attr('height') == '75'); - text: The sixth rect should have a height of 54. testString: assert($('rect').eq(5).attr('height') == '54'); - text: The seventh rect should have a height of 87. testString: assert($('rect').eq(6).attr('height') == '87'); - text: The eighth rect should have a height of 42. testString: assert($('rect').eq(7).attr('height') == '42'); - text: The ninth rect should have a height of 27. testString: assert($('rect').eq(8).attr('height') == '27'); ```
## Challenge Seed
```html ```
## Solution
```html // solution required ```