---
id: 587d7fac367417b2b2512bdb
title: Set a Domain and a Range on a Scale
required:
- src: 'https://cdnjs.cloudflare.com/ajax/libs/d3/4.3.0/d3.min.js'
challengeType: 6
videoUrl: ''
localeTitle: ''
---
## Description
undefined
## Instructions
undefined
## Tests
```yml
tests:
- text: ''
testString: 'assert(code.match(/\.domain/g), "Your code should use the domain()
method.");'
- text: ''
testString: 'assert(JSON.stringify(scale.domain()) == JSON.stringify([250, 500]), "The domain()
of the scale should be set to [250, 500]
.");'
- text: ''
testString: 'assert(code.match(/\.range/g), "Your code should use the range()
method.");'
- text: ''
testString: 'assert(JSON.stringify(scale.range()) == JSON.stringify([10, 150]), "The range()
of the scale should be set to [10, 150]
.");'
- text: ''
testString: 'assert($("h2").text() == "-102", "The text in the h2
should be -102.");'
```
## Challenge Seed
## Solution
```js
// solution required
```