(spec, scope)
| 147301 | }); |
| 147302 | } |
| 147303 | function parseScale(spec, scope) { |
| 147304 | const params = scope.getScale(spec.name).params; |
| 147305 | let key; |
| 147306 | params.domain = parseScaleDomain(spec.domain, spec, scope); |
| 147307 | if (spec.range != null) params.range = parseScaleRange(spec, scope, params); |
| 147308 | if (spec.interpolate != null) parseScaleInterpolate(spec.interpolate, params); |
| 147309 | if (spec.nice != null) params.nice = parseScaleNice(spec.nice); |
| 147310 | if (spec.bins != null) params.bins = parseScaleBins(spec.bins, scope); |
| 147311 | for(key in spec){ |
| 147312 | if ((0, _vegaUtil.hasOwnProperty)(params, key) || key === "name") continue; |
| 147313 | params[key] = parseLiteral(spec[key], scope); |
| 147314 | } |
| 147315 | } |
| 147316 | function parseLiteral(v, scope) { |
| 147317 | return !(0, _vegaUtil.isObject)(v) ? v : v.signal ? scope.signalRef(v.signal) : (0, _vegaUtil.error)("Unsupported object: " + (0, _vegaUtil.stringValue)(v)); |
| 147318 | } |
no test coverage detected