(spec, scope)
| 133541 | } |
| 133542 | |
| 133543 | function parseScale(spec, scope) { |
| 133544 | var params = scope.getScale(spec.name).params, |
| 133545 | key; |
| 133546 | params.domain = parseScaleDomain(spec.domain, spec, scope); |
| 133547 | |
| 133548 | if (spec.range != null) { |
| 133549 | params.range = parseScaleRange(spec, scope, params); |
| 133550 | } |
| 133551 | |
| 133552 | if (spec.interpolate != null) { |
| 133553 | parseScaleInterpolate(spec.interpolate, params); |
| 133554 | } |
| 133555 | |
| 133556 | if (spec.nice != null) { |
| 133557 | params.nice = parseScaleNice(spec.nice); |
| 133558 | } |
| 133559 | |
| 133560 | if (spec.bins != null) { |
| 133561 | params.bins = parseScaleBins(spec.bins, scope); |
| 133562 | } |
| 133563 | |
| 133564 | for (key in spec) { |
| 133565 | if ((0, _vegaUtil.hasOwnProperty)(params, key) || key === 'name') continue; |
| 133566 | params[key] = parseLiteral(spec[key], scope); |
| 133567 | } |
| 133568 | } |
| 133569 | |
| 133570 | function parseLiteral(v, scope) { |
| 133571 | return !(0, _vegaUtil.isObject)(v) ? v : v.signal ? scope.signalRef(v.signal) : (0, _vegaUtil.error)('Unsupported object: ' + (0, _vegaUtil.stringValue)(v)); |
nothing calls this directly
no test coverage detected