UNPKG
@visx/scale
Version:
alpha (0.0.200-alpha.0)
latest (3.12.0)
next (3.2.0-alpha.0)
prerelease (1.3.0-alpha.0)
3.12.0
3.5.0
3.3.0
3.2.0
3.2.0-alpha.0
3.0.0
2.18.0
2.17.0
2.17.0-alpha.0
2.2.2
2.1.2
2.1.0
1.14.0
1.11.1
1.7.0
1.6.1
1.4.0
1.3.0
1.3.0-alpha.0
1.1.0
1.0.0
0.0.200-alpha.0
visx scale
github.com/airbnb/visx
airbnb/visx
@visx/scale
/
lib
/
operators
/
range.js
15 lines
(14 loc)
•
300 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"use strict"
;
exports
.
__esModule
=
true
;
exports
.
default
= applyRange;
function
applyRange
(
scale, config
) {
if
(config.
range
) {
if
(
'padding'
in
scale) {
// point and band scales
scale.
range
(config.
range
); }
else
{
// the rest
scale.
range
(config.
range
); } } }