vega-scale
Advanced tools
Comparing version 2.5.0 to 2.5.1
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-array'), require('d3-scale'), require('vega-util'), require('d3-interpolate'), require('d3-scale-chromatic'), require('d3-time')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'd3-array', 'd3-scale', 'vega-util', 'd3-interpolate', 'd3-scale-chromatic', 'd3-time'], factory) : | ||
(factory((global.vega = {}),global.d3,global.d3,global.vega,global.d3,global.d3,global.d3)); | ||
}(this, (function (exports,d3Array,$,vegaUtil,$$1,_,d3Time) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-array'), require('d3-scale-chromatic'), require('d3-interpolate'), require('vega-util'), require('d3-time'), require('d3-scale')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'd3-array', 'd3-scale-chromatic', 'd3-interpolate', 'vega-util', 'd3-time', 'd3-scale'], factory) : | ||
(factory((global.vega = {}),global.d3,global.d3,global.d3,global.vega,global.d3,global.d3)); | ||
}(this, (function (exports,d3Array,_,$,vegaUtil,d3Time,$$1) { 'use strict'; | ||
@@ -64,3 +64,3 @@ function bandSpace(count, paddingInner, paddingOuter) { | ||
function band() { | ||
var scale = $.scaleOrdinal().unknown(undefined), | ||
var scale = $$1.scaleOrdinal().unknown(undefined), | ||
domain = scale.domain, | ||
@@ -257,3 +257,3 @@ ordinalRange = scale.range, | ||
function binLinear() { | ||
var linear = $.scaleLinear(), | ||
var linear = $$1.scaleLinear(), | ||
domain = []; | ||
@@ -340,3 +340,3 @@ | ||
scale.tickFormat = function() { | ||
var linear = $.scaleLinear().domain([domain[0], vegaUtil.peek(domain)]); | ||
var linear = $$1.scaleLinear().domain([domain[0], vegaUtil.peek(domain)]); | ||
return linear.tickFormat.apply(linear, arguments); | ||
@@ -353,3 +353,3 @@ }; | ||
function sequential(interpolator) { | ||
var linear = $.scaleLinear(), | ||
var linear = $$1.scaleLinear(), | ||
x0 = 0, | ||
@@ -440,13 +440,13 @@ dx = 1, | ||
// base scale types | ||
identity: $.scaleIdentity, | ||
linear: $.scaleLinear, | ||
log: $.scaleLog, | ||
ordinal: $.scaleOrdinal, | ||
pow: $.scalePow, | ||
sqrt: $.scaleSqrt, | ||
quantile: $.scaleQuantile, | ||
quantize: $.scaleQuantize, | ||
threshold: $.scaleThreshold, | ||
time: $.scaleTime, | ||
utc: $.scaleUtc, | ||
identity: $$1.scaleIdentity, | ||
linear: $$1.scaleLinear, | ||
log: $$1.scaleLog, | ||
ordinal: $$1.scaleOrdinal, | ||
pow: $$1.scalePow, | ||
sqrt: $$1.scaleSqrt, | ||
quantile: $$1.scaleQuantile, | ||
quantize: $$1.scaleQuantize, | ||
threshold: $$1.scaleThreshold, | ||
time: $$1.scaleTime, | ||
utc: $$1.scaleUtc, | ||
@@ -485,3 +485,3 @@ // extended scale types | ||
function interpolate(type, gamma) { | ||
var interp = $$1[method(type)]; | ||
var interp = $[method(type)]; | ||
return (gamma != null && interp && interp.gamma) | ||
@@ -571,3 +571,3 @@ ? interp.gamma(gamma) | ||
// extended interpolators | ||
blueorange: $$1.interpolateRgbBasis(vegaUtil.peek(blueOrange)) | ||
blueorange: $.interpolateRgbBasis(vegaUtil.peek(blueOrange)) | ||
}; | ||
@@ -631,3 +631,3 @@ | ||
discretized[name] = schemeArray; | ||
schemes[name] = interpolator || $$1.interpolateRgbBasis(vegaUtil.peek(schemeArray)); | ||
schemes[name] = interpolator || $.interpolateRgbBasis(vegaUtil.peek(schemeArray)); | ||
return this; | ||
@@ -671,3 +671,3 @@ } | ||
exports.scaleImplicit = $.scaleImplicit; | ||
exports.scaleImplicit = $$1.scaleImplicit; | ||
exports.bandSpace = bandSpace; | ||
@@ -674,0 +674,0 @@ exports.scale = scale; |
@@ -1,1 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-array"),require("d3-scale"),require("vega-util"),require("d3-interpolate"),require("d3-scale-chromatic"),require("d3-time")):"function"==typeof define&&define.amd?define(["exports","d3-array","d3-scale","vega-util","d3-interpolate","d3-scale-chromatic","d3-time"],n):n(e.vega={},e.d3,e.d3,e.vega,e.d3,e.d3,e.d3)}(this,function(e,g,m,u,a,r,n){"use strict";function h(e,n,r){var t=e-n+2*r;return e?0<t?t:1:0}function t(){var c,d,r=m.scaleOrdinal().unknown(void 0),l=r.domain,f=r.range,s=[0,1],o=!1,u=0,b=0,p=.5;function n(){var e=l().length,n=s[1]<s[0],r=s[n-0],t=s[1-n],a=h(e,u,b);c=(t-r)/(a||1),o&&(c=Math.floor(c)),r+=(t-r-c*(e-u))*p,d=c*(1-u),o&&(r=Math.round(r),d=Math.round(d));var i=g.range(e).map(function(e){return r+c*e});return f(n?i.reverse():i)}return delete r.unknown,r.domain=function(e){return arguments.length?(l(e),n()):l()},r.range=function(e){return arguments.length?(s=[+e[0],+e[1]],n()):s.slice()},r.rangeRound=function(e){return s=[+e[0],+e[1]],o=!0,n()},r.bandwidth=function(){return d},r.step=function(){return c},r.round=function(e){return arguments.length?(o=!!e,n()):o},r.padding=function(e){return arguments.length?(b=Math.max(0,Math.min(1,e)),u=b,n()):u},r.paddingInner=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),n()):u},r.paddingOuter=function(e){return arguments.length?(b=Math.max(0,Math.min(1,e)),n()):b},r.align=function(e){return arguments.length?(p=Math.max(0,Math.min(1,e)),n()):p},r.invertRange=function(e){if(null!=e[0]&&null!=e[1]){var n,r,t,a=+e[0],i=+e[1],c=s[1]<s[0],o=c?f().reverse():f(),u=o.length-1;if(a==a&&i==i&&(i<a&&(t=a,a=i,i=t),!(i<o[0]||a>s[1-c])))return n=Math.max(0,g.bisectRight(o,a)-1),r=a===i?n:g.bisectRight(o,i)-1,a-o[n]>d+1e-10&&++n,c&&(t=n,n=u-r,r=u-t),r<n?void 0:l().slice(n,r+1)}},r.invert=function(e){var n=r.invertRange([e,e]);return n?n[0]:n},r.copy=function(){return t().domain(l()).range(s).round(o).paddingInner(u).paddingOuter(b).align(p)},n()}var i=Array.prototype.map,c=Array.prototype.slice;function o(e){return i.call(e,function(e){return+e})}function d(e,n){return 1<arguments.length?(l[e]=(r=e,t=n,function(){var d,a,e=t();return e.invertRange||(e.invertRange=e.invert?(a=e,function(e){var n,r=e[0],t=e[1];return t<r&&(n=r,r=t,t=n),[a.invert(r),a.invert(t)]}):e.invertExtent?(d=e,function(e){var n,r,t,a,i=d.range(),c=e[0],o=e[1],u=-1;for(o<c&&(r=c,c=o,o=r),t=0,a=i.length;t<a;++t)i[t]>=c&&i[t]<=o&&(u<0&&(u=t),n=t);if(!(u<0))return c=d.invertExtent(i[u]),o=d.invertExtent(i[n]),[void 0===c[0]?c[1]:c[0],void 0===o[1]?o[0]:o[1]]}):void 0),e.type=r,e}),this):l.hasOwnProperty(e)?l[e]:void 0;var r,t}var l={identity:m.scaleIdentity,linear:m.scaleLinear,log:m.scaleLog,ordinal:m.scaleOrdinal,pow:m.scalePow,sqrt:m.scaleSqrt,quantile:m.scaleQuantile,quantize:m.scaleQuantize,threshold:m.scaleThreshold,time:m.scaleTime,utc:m.scaleUtc,band:t,point:function(){return function e(n){var r=n.copy;return n.padding=n.paddingOuter,delete n.paddingInner,n.copy=function(){return e(r())},n}(t().paddingInner(1))},sequential:function e(r){var t=m.scaleLinear(),a=0,i=1,c=!1;function n(){var e=t.domain();a=e[0],i=u.peek(e)-a}function o(e){var n=(e-a)/i;return r(c?Math.max(0,Math.min(1,n)):n)}return o.clamp=function(e){return arguments.length?(c=!!e,o):c},o.domain=function(e){return arguments.length?(t.domain(e),n(),o):t.domain()},o.interpolator=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return e().domain(t.domain()).clamp(c).interpolator(r)},o.ticks=function(e){return t.ticks(e)},o.tickFormat=function(e,n){return t.tickFormat(e,n)},o.nice=function(e){return t.nice(e),n(),o},o},"bin-linear":function e(){var n=m.scaleLinear(),t=[];function a(e){return n(e)}return a.domain=function(e){return arguments.length?(t=o(e),n.domain([t[0],u.peek(t)]),a):t.slice()},a.range=function(e){return arguments.length?(n.range(e),a):n.range()},a.rangeRound=function(e){return arguments.length?(n.rangeRound(e),a):n.rangeRound()},a.interpolate=function(e){return arguments.length?(n.interpolate(e),a):n.interpolate()},a.invert=function(e){return n.invert(e)},a.ticks=function(e){var n=t.length,r=~~(n/(e||n));return r<2?a.domain():t.filter(function(e,n){return!(n%r)})},a.tickFormat=function(){return n.tickFormat.apply(n,arguments)},a.copy=function(){return e().domain(a.domain()).range(a.range())},a},"bin-ordinal":function e(){var n=[],r=[];function t(e){return null==e||e!=e?void 0:r[(g.bisect(n,e)-1)%r.length]}return t.domain=function(e){return arguments.length?(n=o(e),t):n.slice()},t.range=function(e){return arguments.length?(r=c.call(e),t):r.slice()},t.tickFormat=function(){var e=m.scaleLinear().domain([n[0],u.peek(n)]);return e.tickFormat.apply(e,arguments)},t.copy=function(){return e().domain(t.domain()).range(t.range())},t}};for(var f in l)d(f,l[f]);function s(n,e){var r=e-n;return function(e){return n+e*r}}function b(e){for(var n=e.length/6|0,r=new Array(n),t=0;t<n;)r[t]="#"+e.slice(6*t,6*++t);return r}var p=b("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),v=b("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),y=b("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),w=b("4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac"),k=b("4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"),R=new Array(3).concat("67a9cff7f7f7f1a340","0571b092c5defdb863e66101","0571b092c5def7f7f7fdb863e66101","2166ac67a9cfd1e5f0fee0b6f1a340b35806","2166ac67a9cfd1e5f0f7f7f7fee0b6f1a340b35806","2166ac4393c392c5ded1e5f0fee0b6fdb863e08214b35806","2166ac4393c392c5ded1e5f0f7f7f7fee0b6fdb863e08214b35806","0530612166ac4393c392c5ded1e5f0fee0b6fdb863e08214b358067f3b08","0530612166ac4393c392c5ded1e5f0f7f7f7fee0b6fdb863e08214b358067f3b08").map(b),M={blueorange:R},P={category10:r.schemeCategory10,accent:r.schemeAccent,dark2:r.schemeDark2,paired:r.schemePaired,pastel1:r.schemePastel1,pastel2:r.schemePastel2,set1:r.schemeSet1,set2:r.schemeSet2,set3:r.schemeSet3,category20:p,category20b:v,category20c:y,tableau10:w,tableau20:k,viridis:r.interpolateViridis,magma:r.interpolateMagma,inferno:r.interpolateInferno,plasma:r.interpolatePlasma,rainbow:r.interpolateRainbow,sinebow:r.interpolateSinebow,blueorange:a.interpolateRgbBasis(u.peek(R))};function O(e,n){P[e]=r["interpolate"+n],M[e]=r["scheme"+n]}O("blues","Blues"),O("greens","Greens"),O("greys","Greys"),O("purples","Purples"),O("reds","Reds"),O("oranges","Oranges"),O("brownbluegreen","BrBG"),O("purplegreen","PRGn"),O("pinkyellowgreen","PiYG"),O("purpleorange","PuOr"),O("redblue","RdBu"),O("redgrey","RdGy"),O("redyellowblue","RdYlBu"),O("redyellowgreen","RdYlGn"),O("spectral","Spectral"),O("bluegreen","BuGn"),O("bluepurple","BuPu"),O("greenblue","GnBu"),O("orangered","OrRd"),O("purplebluegreen","PuBuGn"),O("purpleblue","PuBu"),O("purplered","PuRd"),O("redpurple","RdPu"),O("yellowgreenblue","YlGnBu"),O("yellowgreen","YlGn"),O("yelloworangebrown","YlOrBr"),O("yelloworangered","YlOrRd");var B={millisecond:n.timeMillisecond,second:n.timeSecond,minute:n.timeMinute,hour:n.timeHour,day:n.timeDay,week:n.timeWeek,month:n.timeMonth,year:n.timeYear},q={millisecond:n.utcMillisecond,second:n.utcSecond,minute:n.utcMinute,hour:n.utcHour,day:n.utcDay,week:n.utcWeek,month:n.utcMonth,year:n.utcYear};e.scaleImplicit=m.scaleImplicit,e.bandSpace=h,e.scale=d,e.interpolate=function(e,n){var r,t=a[(r=e,"interpolate"+r.toLowerCase().split("-").map(function(e){return e[0].toUpperCase()+e.slice(1)}).join(""))];return null!=n&&t&&t.gamma?t.gamma(n):t},e.interpolateRange=function(n,e){var r=e[0],t=u.peek(e)-r;return function(e){return n(r+e*t)}},e.scaleFraction=function(e,n,r){var t=r-n;return t&&isFinite(t)?"linear"===e.type||"sequential"===e.type?function(e){return(e-n)/t}:e.copy().domain([n,r]).range([0,1]).interpolate(s):u.constant(0)},e.scheme=function(e,n){if(1<arguments.length)return P[e]=n,this;var r=e.split("-");return e=r[0],(r=+r[1]+1)&&M.hasOwnProperty(e)?M[e][r-1]:!r&&P.hasOwnProperty(e)?P[e]:void 0},e.schemeDiscretized=function(e,n,r){return 1<arguments.length?(M[e]=n,P[e]=r||a.interpolateRgbBasis(u.peek(n)),this):M.hasOwnProperty(e)?M[e]:void 0},e.timeInterval=function(e){return B.hasOwnProperty(e)&&B[e]},e.utcInterval=function(e){return q.hasOwnProperty(e)&&q[e]},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-array"),require("d3-scale-chromatic"),require("d3-interpolate"),require("vega-util"),require("d3-time"),require("d3-scale")):"function"==typeof define&&define.amd?define(["exports","d3-array","d3-scale-chromatic","d3-interpolate","vega-util","d3-time","d3-scale"],n):n(e.vega={},e.d3,e.d3,e.d3,e.vega,e.d3,e.d3)}(this,function(e,g,r,a,u,n,m){"use strict";function h(e,n,r){var t=e-n+2*r;return e?0<t?t:1:0}function t(){var c,d,r=m.scaleOrdinal().unknown(void 0),l=r.domain,f=r.range,s=[0,1],o=!1,u=0,b=0,p=.5;function n(){var e=l().length,n=s[1]<s[0],r=s[n-0],t=s[1-n],a=h(e,u,b);c=(t-r)/(a||1),o&&(c=Math.floor(c)),r+=(t-r-c*(e-u))*p,d=c*(1-u),o&&(r=Math.round(r),d=Math.round(d));var i=g.range(e).map(function(e){return r+c*e});return f(n?i.reverse():i)}return delete r.unknown,r.domain=function(e){return arguments.length?(l(e),n()):l()},r.range=function(e){return arguments.length?(s=[+e[0],+e[1]],n()):s.slice()},r.rangeRound=function(e){return s=[+e[0],+e[1]],o=!0,n()},r.bandwidth=function(){return d},r.step=function(){return c},r.round=function(e){return arguments.length?(o=!!e,n()):o},r.padding=function(e){return arguments.length?(b=Math.max(0,Math.min(1,e)),u=b,n()):u},r.paddingInner=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),n()):u},r.paddingOuter=function(e){return arguments.length?(b=Math.max(0,Math.min(1,e)),n()):b},r.align=function(e){return arguments.length?(p=Math.max(0,Math.min(1,e)),n()):p},r.invertRange=function(e){if(null!=e[0]&&null!=e[1]){var n,r,t,a=+e[0],i=+e[1],c=s[1]<s[0],o=c?f().reverse():f(),u=o.length-1;if(a==a&&i==i&&(i<a&&(t=a,a=i,i=t),!(i<o[0]||a>s[1-c])))return n=Math.max(0,g.bisectRight(o,a)-1),r=a===i?n:g.bisectRight(o,i)-1,a-o[n]>d+1e-10&&++n,c&&(t=n,n=u-r,r=u-t),r<n?void 0:l().slice(n,r+1)}},r.invert=function(e){var n=r.invertRange([e,e]);return n?n[0]:n},r.copy=function(){return t().domain(l()).range(s).round(o).paddingInner(u).paddingOuter(b).align(p)},n()}var i=Array.prototype.map,c=Array.prototype.slice;function o(e){return i.call(e,function(e){return+e})}function d(e,n){return 1<arguments.length?(l[e]=(r=e,t=n,function(){var d,a,e=t();return e.invertRange||(e.invertRange=e.invert?(a=e,function(e){var n,r=e[0],t=e[1];return t<r&&(n=r,r=t,t=n),[a.invert(r),a.invert(t)]}):e.invertExtent?(d=e,function(e){var n,r,t,a,i=d.range(),c=e[0],o=e[1],u=-1;for(o<c&&(r=c,c=o,o=r),t=0,a=i.length;t<a;++t)i[t]>=c&&i[t]<=o&&(u<0&&(u=t),n=t);if(!(u<0))return c=d.invertExtent(i[u]),o=d.invertExtent(i[n]),[void 0===c[0]?c[1]:c[0],void 0===o[1]?o[0]:o[1]]}):void 0),e.type=r,e}),this):l.hasOwnProperty(e)?l[e]:void 0;var r,t}var l={identity:m.scaleIdentity,linear:m.scaleLinear,log:m.scaleLog,ordinal:m.scaleOrdinal,pow:m.scalePow,sqrt:m.scaleSqrt,quantile:m.scaleQuantile,quantize:m.scaleQuantize,threshold:m.scaleThreshold,time:m.scaleTime,utc:m.scaleUtc,band:t,point:function(){return function e(n){var r=n.copy;return n.padding=n.paddingOuter,delete n.paddingInner,n.copy=function(){return e(r())},n}(t().paddingInner(1))},sequential:function e(r){var t=m.scaleLinear(),a=0,i=1,c=!1;function n(){var e=t.domain();a=e[0],i=u.peek(e)-a}function o(e){var n=(e-a)/i;return r(c?Math.max(0,Math.min(1,n)):n)}return o.clamp=function(e){return arguments.length?(c=!!e,o):c},o.domain=function(e){return arguments.length?(t.domain(e),n(),o):t.domain()},o.interpolator=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return e().domain(t.domain()).clamp(c).interpolator(r)},o.ticks=function(e){return t.ticks(e)},o.tickFormat=function(e,n){return t.tickFormat(e,n)},o.nice=function(e){return t.nice(e),n(),o},o},"bin-linear":function e(){var n=m.scaleLinear(),t=[];function a(e){return n(e)}return a.domain=function(e){return arguments.length?(t=o(e),n.domain([t[0],u.peek(t)]),a):t.slice()},a.range=function(e){return arguments.length?(n.range(e),a):n.range()},a.rangeRound=function(e){return arguments.length?(n.rangeRound(e),a):n.rangeRound()},a.interpolate=function(e){return arguments.length?(n.interpolate(e),a):n.interpolate()},a.invert=function(e){return n.invert(e)},a.ticks=function(e){var n=t.length,r=~~(n/(e||n));return r<2?a.domain():t.filter(function(e,n){return!(n%r)})},a.tickFormat=function(){return n.tickFormat.apply(n,arguments)},a.copy=function(){return e().domain(a.domain()).range(a.range())},a},"bin-ordinal":function e(){var n=[],r=[];function t(e){return null==e||e!=e?void 0:r[(g.bisect(n,e)-1)%r.length]}return t.domain=function(e){return arguments.length?(n=o(e),t):n.slice()},t.range=function(e){return arguments.length?(r=c.call(e),t):r.slice()},t.tickFormat=function(){var e=m.scaleLinear().domain([n[0],u.peek(n)]);return e.tickFormat.apply(e,arguments)},t.copy=function(){return e().domain(t.domain()).range(t.range())},t}};for(var f in l)d(f,l[f]);function s(n,e){var r=e-n;return function(e){return n+e*r}}function b(e){for(var n=e.length/6|0,r=new Array(n),t=0;t<n;)r[t]="#"+e.slice(6*t,6*++t);return r}var p=b("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),v=b("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),y=b("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),w=b("4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac"),k=b("4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"),R=new Array(3).concat("67a9cff7f7f7f1a340","0571b092c5defdb863e66101","0571b092c5def7f7f7fdb863e66101","2166ac67a9cfd1e5f0fee0b6f1a340b35806","2166ac67a9cfd1e5f0f7f7f7fee0b6f1a340b35806","2166ac4393c392c5ded1e5f0fee0b6fdb863e08214b35806","2166ac4393c392c5ded1e5f0f7f7f7fee0b6fdb863e08214b35806","0530612166ac4393c392c5ded1e5f0fee0b6fdb863e08214b358067f3b08","0530612166ac4393c392c5ded1e5f0f7f7f7fee0b6fdb863e08214b358067f3b08").map(b),M={blueorange:R},P={category10:r.schemeCategory10,accent:r.schemeAccent,dark2:r.schemeDark2,paired:r.schemePaired,pastel1:r.schemePastel1,pastel2:r.schemePastel2,set1:r.schemeSet1,set2:r.schemeSet2,set3:r.schemeSet3,category20:p,category20b:v,category20c:y,tableau10:w,tableau20:k,viridis:r.interpolateViridis,magma:r.interpolateMagma,inferno:r.interpolateInferno,plasma:r.interpolatePlasma,rainbow:r.interpolateRainbow,sinebow:r.interpolateSinebow,blueorange:a.interpolateRgbBasis(u.peek(R))};function O(e,n){P[e]=r["interpolate"+n],M[e]=r["scheme"+n]}O("blues","Blues"),O("greens","Greens"),O("greys","Greys"),O("purples","Purples"),O("reds","Reds"),O("oranges","Oranges"),O("brownbluegreen","BrBG"),O("purplegreen","PRGn"),O("pinkyellowgreen","PiYG"),O("purpleorange","PuOr"),O("redblue","RdBu"),O("redgrey","RdGy"),O("redyellowblue","RdYlBu"),O("redyellowgreen","RdYlGn"),O("spectral","Spectral"),O("bluegreen","BuGn"),O("bluepurple","BuPu"),O("greenblue","GnBu"),O("orangered","OrRd"),O("purplebluegreen","PuBuGn"),O("purpleblue","PuBu"),O("purplered","PuRd"),O("redpurple","RdPu"),O("yellowgreenblue","YlGnBu"),O("yellowgreen","YlGn"),O("yelloworangebrown","YlOrBr"),O("yelloworangered","YlOrRd");var B={millisecond:n.timeMillisecond,second:n.timeSecond,minute:n.timeMinute,hour:n.timeHour,day:n.timeDay,week:n.timeWeek,month:n.timeMonth,year:n.timeYear},q={millisecond:n.utcMillisecond,second:n.utcSecond,minute:n.utcMinute,hour:n.utcHour,day:n.utcDay,week:n.utcWeek,month:n.utcMonth,year:n.utcYear};e.scaleImplicit=m.scaleImplicit,e.bandSpace=h,e.scale=d,e.interpolate=function(e,n){var r,t=a[(r=e,"interpolate"+r.toLowerCase().split("-").map(function(e){return e[0].toUpperCase()+e.slice(1)}).join(""))];return null!=n&&t&&t.gamma?t.gamma(n):t},e.interpolateRange=function(n,e){var r=e[0],t=u.peek(e)-r;return function(e){return n(r+e*t)}},e.scaleFraction=function(e,n,r){var t=r-n;return t&&isFinite(t)?"linear"===e.type||"sequential"===e.type?function(e){return(e-n)/t}:e.copy().domain([n,r]).range([0,1]).interpolate(s):u.constant(0)},e.scheme=function(e,n){if(1<arguments.length)return P[e]=n,this;var r=e.split("-");return e=r[0],(r=+r[1]+1)&&M.hasOwnProperty(e)?M[e][r-1]:!r&&P.hasOwnProperty(e)?P[e]:void 0},e.schemeDiscretized=function(e,n,r){return 1<arguments.length?(M[e]=n,P[e]=r||a.interpolateRgbBasis(u.peek(n)),this):M.hasOwnProperty(e)?M[e]:void 0},e.timeInterval=function(e){return B.hasOwnProperty(e)&&B[e]},e.utcInterval=function(e){return q.hasOwnProperty(e)&&q[e]},Object.defineProperty(e,"__esModule",{value:!0})}); |
{ | ||
"name": "vega-scale", | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"description": "Scales and color schemes for visual encoding.", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
"dependencies": { | ||
"d3-array": "^1.2.4", | ||
"d3-array": "^2.0.2", | ||
"d3-interpolate": "^1.3.2", | ||
@@ -41,3 +41,3 @@ "d3-scale": "^2.1.2", | ||
"eslint": "5", | ||
"rollup": "0.66.6", | ||
"rollup": "0.67.4", | ||
"tape": "4", | ||
@@ -44,0 +44,0 @@ "uglify-js": "3" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52884
+ Addedd3-array@2.12.1(transitive)
+ Addedinternmap@1.0.1(transitive)
Updatedd3-array@^2.0.2