vega-scale
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -460,2 +460,14 @@ (function (global, factory) { | ||
var category20 = colors( | ||
'1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5' | ||
); | ||
var category20b = colors( | ||
'393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6' | ||
); | ||
var category20c = colors( | ||
'3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9' | ||
); | ||
var tableau10 = colors( | ||
@@ -486,9 +498,4 @@ '4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac' | ||
var schemes = { | ||
// d3 built-in categorical palettes | ||
category10: $.schemeCategory10, | ||
category20: $.schemeCategory20, | ||
category20b: $.schemeCategory20b, | ||
category20c: $.schemeCategory20c, | ||
// extended categorical palettes | ||
// d3 categorical palettes | ||
category10: _.schemeCategory10, | ||
accent: _.schemeAccent, | ||
@@ -502,10 +509,15 @@ dark2: _.schemeDark2, | ||
set3: _.schemeSet3, | ||
// additional categorical palettes | ||
category20: category20, | ||
category20b: category20b, | ||
category20c: category20c, | ||
tableau10: tableau10, | ||
tableau20: tableau20, | ||
// d3 built-in interpolators | ||
viridis: $.interpolateViridis, | ||
magma: $.interpolateMagma, | ||
inferno: $.interpolateInferno, | ||
plasma: $.interpolatePlasma, | ||
// sequential multi-hue interpolators | ||
viridis: _.interpolateViridis, | ||
magma: _.interpolateMagma, | ||
inferno: _.interpolateInferno, | ||
plasma: _.interpolatePlasma, | ||
@@ -512,0 +524,0 @@ // extended interpolators |
@@ -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-scale-chromatic"),require("d3-interpolate"),require("d3-time")):"function"==typeof define&&define.amd?define(["exports","d3-array","d3-scale","vega-util","d3-scale-chromatic","d3-interpolate","d3-time"],n):n(e.vega=e.vega||{},e.d3,e.d3,e.vega,e.d3,e.d3,e.d3)}(this,function(e,n,r,t,a,i,u){"use strict";function o(){function e(){var e=u().length,r=l[1]<l[0],i=l[r-0],o=l[1-r],p=M(e,f,s);t=(o-i)/(p||1),d&&(t=Math.floor(t)),i+=(o-i-t*(e-f))*g,a=t*(1-f),d&&(i=Math.round(i),a=Math.round(a));var m=n.range(e).map(function(e){return i+t*e});return c(r?m.reverse():m)}var t,a,i=r.scaleOrdinal().unknown(void 0),u=i.domain,c=i.range,l=[0,1],d=!1,f=0,s=0,g=.5;return delete i.unknown,i.domain=function(n){return arguments.length?(u(n),e()):u()},i.range=function(n){return arguments.length?(l=[+n[0],+n[1]],e()):l.slice()},i.rangeRound=function(n){return l=[+n[0],+n[1]],d=!0,e()},i.bandwidth=function(){return a},i.step=function(){return t},i.round=function(n){return arguments.length?(d=!!n,e()):d},i.padding=function(n){return arguments.length?(s=Math.max(0,Math.min(1,n)),f=s,e()):f},i.paddingInner=function(n){return arguments.length?(f=Math.max(0,Math.min(1,n)),e()):f},i.paddingOuter=function(n){return arguments.length?(s=Math.max(0,Math.min(1,n)),e()):s},i.align=function(n){return arguments.length?(g=Math.max(0,Math.min(1,n)),e()):g},i.invertRange=function(e){if(null!=e[0]&&null!=e[1]){var r,t,i,o=+e[0],d=+e[1],f=l[1]<l[0],s=f?c().reverse():c(),g=s.length-1;if(o===o&&d===d&&(d<o&&(i=o,o=d,d=i),!(d<s[0]||o>l[1-f])))return r=Math.max(0,n.bisectRight(s,o)-1),t=o===d?r:n.bisectRight(s,d)-1,o-s[r]>a+1e-10&&++r,f&&(i=r,r=g-t,t=g-i),r>t?void 0:u().slice(r,t+1)}},i.invert=function(e){var n=i.invertRange([e,e]);return n?n[0]:n},i.copy=function(){return o().domain(u()).range(l).round(d).paddingInner(f).paddingOuter(s).align(g)},e()}function c(e){var n=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return c(n())},e}function l(e){return R.call(e,function(e){return+e})}function d(){function e(e){return a(e)}function n(e){i=l(e),a.domain([i[0],t.peek(i)])}var a=r.scaleLinear(),i=[];return e.domain=function(r){return arguments.length?(n(r),e):i.slice()},e.range=function(n){return arguments.length?(a.range(n),e):a.range()},e.rangeRound=function(n){return arguments.length?(a.rangeRound(n),e):a.rangeRound()},e.interpolate=function(n){return arguments.length?(a.interpolate(n),e):a.interpolate()},e.invert=function(e){return a.invert(e)},e.ticks=function(n){var r=i.length,t=~~(r/(n||r));return t<2?e.domain():i.filter(function(e,n){return!(n%t)})},e.tickFormat=function(){return a.tickFormat.apply(a,arguments)},e.copy=function(){return d().domain(e.domain()).range(e.range())},e}function f(){function e(e){return null==e||e!==e?void 0:t[(n.bisect(r,e)-1)%t.length]}var r=[],t=[];return e.domain=function(n){return arguments.length?(r=l(n),e):r.slice()},e.range=function(n){return arguments.length?(t=k.call(n),e):t.slice()},e.copy=function(){return f().domain(e.domain()).range(e.range())},e}function s(e){function n(){var e=i.domain();u=e[0],o=t.peek(e)-u}function a(n){var r=(n-u)/o;return e(c?Math.max(0,Math.min(1,r)):r)}var i=r.scaleLinear(),u=0,o=1,c=!1;return a.clamp=function(e){return arguments.length?(c=!!e,a):c},a.domain=function(e){return arguments.length?(i.domain(e),n(),a):i.domain()},a.interpolator=function(n){return arguments.length?(e=n,a):e},a.copy=function(){return s().domain(i.domain()).clamp(c).interpolator(e)},a.ticks=function(e){return i.ticks(e)},a.tickFormat=function(e,n){return i.tickFormat(e,n)},a.nice=function(e){return i.nice(e),n(),a},a}function g(e,n){return function(){var r=n();return r.invertRange||(r.invertRange=r.invert?y(r):r.invertExtent?w(r):void 0),r.type=e,r}}function p(e,n){return arguments.length>1?(P[e]=g(e,n),this):P.hasOwnProperty(e)?P[e]:void 0}function m(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}function h(e,n){Y[e]=a["interpolate"+n],G[e]=a["scheme"+n]}function b(e,n){var r=n-e;return function(n){return e+n*r}}function v(e){return"interpolate"+e.toLowerCase().split("-").map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("")}var y=function(e){return function(n){var r,t=n[0],a=n[1];return a<t&&(r=t,t=a,a=r),[e.invert(t),e.invert(a)]}},w=function(e){return function(n){var r,t,a,i,u=e.range(),o=n[0],c=n[1],l=-1;for(c<o&&(t=o,o=c,c=t),a=0,i=u.length;a<i;++a)u[a]>=o&&u[a]<=c&&(l<0&&(l=a),r=a);if(!(l<0))return o=e.invertExtent(u[l]),c=e.invertExtent(u[r]),[void 0===o[0]?o[1]:o[0],void 0===c[1]?c[0]:c[1]]}},M=function(e,n,r){var t=e-n+2*r;return e?t>0?t:1:0},R=Array.prototype.map,k=Array.prototype.slice,P={identity:r.scaleIdentity,linear:r.scaleLinear,log:r.scaleLog,ordinal:r.scaleOrdinal,pow:r.scalePow,sqrt:r.scaleSqrt,quantile:r.scaleQuantile,quantize:r.scaleQuantize,threshold:r.scaleThreshold,time:r.scaleTime,utc:r.scaleUtc,band:o,point:function(){return c(o().paddingInner(1))},sequential:s,"bin-linear":d,"bin-ordinal":f};for(var O in P)p(O,P[O]);var B=m("4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac"),q=m("4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"),x=new Array(3).concat("67a9cff7f7f7f1a340","0571b092c5defdb863e66101","0571b092c5def7f7f7fdb863e66101","2166ac67a9cfd1e5f0fee0b6f1a340b35806","2166ac67a9cfd1e5f0f7f7f7fee0b6f1a340b35806","2166ac4393c392c5ded1e5f0fee0b6fdb863e08214b35806","2166ac4393c392c5ded1e5f0f7f7f7fee0b6fdb863e08214b35806","0530612166ac4393c392c5ded1e5f0fee0b6fdb863e08214b358067f3b08","0530612166ac4393c392c5ded1e5f0f7f7f7fee0b6fdb863e08214b358067f3b08").map(m),G={blueorange:x},Y={category10:r.schemeCategory10,category20:r.schemeCategory20,category20b:r.schemeCategory20b,category20c:r.schemeCategory20c,accent:a.schemeAccent,dark2:a.schemeDark2,paired:a.schemePaired,pastel1:a.schemePastel1,pastel2:a.schemePastel2,set1:a.schemeSet1,set2:a.schemeSet2,set3:a.schemeSet3,tableau10:B,tableau20:q,viridis:r.interpolateViridis,magma:r.interpolateMagma,inferno:r.interpolateInferno,plasma:r.interpolatePlasma,blueorange:i.interpolateRgbBasis(t.peek(x))};h("blues","Blues"),h("greens","Greens"),h("greys","Greys"),h("purples","Purples"),h("reds","Reds"),h("oranges","Oranges"),h("brownbluegreen","BrBG"),h("purplegreen","PRGn"),h("pinkyellowgreen","PiYG"),h("purpleorange","PuOr"),h("redblue","RdBu"),h("redgrey","RdGy"),h("redyellowblue","RdYlBu"),h("redyellowgreen","RdYlGn"),h("spectral","Spectral"),h("bluegreen","BuGn"),h("bluepurple","BuPu"),h("greenblue","GnBu"),h("orangered","OrRd"),h("purplebluegreen","PuBuGn"),h("purpleblue","PuBu"),h("purplered","PuRd"),h("redpurple","RdPu"),h("yellowgreenblue","YlGnBu"),h("yellowgreen","YlGn"),h("yelloworangebrown","YlOrBr"),h("yelloworangered","YlOrRd");var I={millisecond:u.timeMillisecond,second:u.timeSecond,minute:u.timeMinute,hour:u.timeHour,day:u.timeDay,week:u.timeWeek,month:u.timeMonth,year:u.timeYear},S={millisecond:u.utcMillisecond,second:u.utcSecond,minute:u.utcMinute,hour:u.utcHour,day:u.utcDay,week:u.utcWeek,month:u.utcMonth,year:u.utcYear};e.scale=p,e.scheme=function(e,n){if(arguments.length>1)return Y[e]=n,this;var r=e.split("-");return e=r[0],(r=+r[1]+1)&&G.hasOwnProperty(e)?G[e][r-1]:!r&&Y.hasOwnProperty(e)?Y[e]:void 0},e.bandSpace=M,e.interpolate=function(e,n){var r=i[v(e)];return null!=n&&r&&r.gamma?r.gamma(n):r},e.interpolateRange=function(e,n){var r=n[0],a=t.peek(n)-r;return function(n){return e(r+n*a)}},e.scaleFraction=function(e,n,r){var a=r-n;return a?"linear"===e.type||"sequential"===e.type?function(e){return(e-n)/a}:e.copy().domain([n,r]).range([0,1]).interpolate(b):t.constant(0)},e.timeInterval=function(e){return I.hasOwnProperty(e)&&I[e]},e.utcInterval=function(e){return S.hasOwnProperty(e)&&S[e]},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-array"),require("d3-scale"),require("vega-util"),require("d3-scale-chromatic"),require("d3-interpolate"),require("d3-time")):"function"==typeof define&&define.amd?define(["exports","d3-array","d3-scale","vega-util","d3-scale-chromatic","d3-interpolate","d3-time"],n):n(e.vega=e.vega||{},e.d3,e.d3,e.vega,e.d3,e.d3,e.d3)}(this,function(e,n,r,t,a,i,c){"use strict";var u=function(e){return function(n){var r,t=n[0],a=n[1];return a<t&&(r=t,t=a,a=r),[e.invert(t),e.invert(a)]}},o=function(e){return function(n){var r,t,a,i,c=e.range(),u=n[0],o=n[1],d=-1;for(o<u&&(t=u,u=o,o=t),a=0,i=c.length;a<i;++a)c[a]>=u&&c[a]<=o&&(d<0&&(d=a),r=a);if(!(d<0))return u=e.invertExtent(c[d]),o=e.invertExtent(c[r]),[void 0===u[0]?u[1]:u[0],void 0===o[1]?o[0]:o[1]]}},d=function(e,n,r){var t=e-n+2*r;return e?t>0?t:1:0};function l(){var e,t,a=r.scaleOrdinal().unknown(void 0),i=a.domain,c=a.range,u=[0,1],o=!1,f=0,b=0,s=.5;function g(){var r=i().length,a=u[1]<u[0],l=u[a-0],g=u[1-a],p=d(r,f,b);e=(g-l)/(p||1),o&&(e=Math.floor(e)),l+=(g-l-e*(r-f))*s,t=e*(1-f),o&&(l=Math.round(l),t=Math.round(t));var m=n.range(r).map(function(n){return l+e*n});return c(a?m.reverse():m)}return delete a.unknown,a.domain=function(e){return arguments.length?(i(e),g()):i()},a.range=function(e){return arguments.length?(u=[+e[0],+e[1]],g()):u.slice()},a.rangeRound=function(e){return u=[+e[0],+e[1]],o=!0,g()},a.bandwidth=function(){return t},a.step=function(){return e},a.round=function(e){return arguments.length?(o=!!e,g()):o},a.padding=function(e){return arguments.length?(b=Math.max(0,Math.min(1,e)),f=b,g()):f},a.paddingInner=function(e){return arguments.length?(f=Math.max(0,Math.min(1,e)),g()):f},a.paddingOuter=function(e){return arguments.length?(b=Math.max(0,Math.min(1,e)),g()):b},a.align=function(e){return arguments.length?(s=Math.max(0,Math.min(1,e)),g()):s},a.invertRange=function(e){if(null!=e[0]&&null!=e[1]){var r,a,o,d=+e[0],l=+e[1],f=u[1]<u[0],b=f?c().reverse():c(),s=b.length-1;if(d==d&&l==l&&(l<d&&(o=d,d=l,l=o),!(l<b[0]||d>u[1-f])))return r=Math.max(0,n.bisectRight(b,d)-1),a=d===l?r:n.bisectRight(b,l)-1,d-b[r]>t+1e-10&&++r,f&&(o=r,r=s-a,a=s-o),r>a?void 0:i().slice(r,a+1)}},a.invert=function(e){var n=a.invertRange([e,e]);return n?n[0]:n},a.copy=function(){return l().domain(i()).range(u).round(o).paddingInner(f).paddingOuter(b).align(s)},g()}var f=Array.prototype.map,b=Array.prototype.slice;function s(e){return f.call(e,function(e){return+e})}function g(e,n){return arguments.length>1?(p[e]=(r=e,t=n,function(){var e=t();return e.invertRange||(e.invertRange=e.invert?u(e):e.invertExtent?o(e):void 0),e.type=r,e}),this):p.hasOwnProperty(e)?p[e]:void 0;var r,t}var p={identity:r.scaleIdentity,linear:r.scaleLinear,log:r.scaleLog,ordinal:r.scaleOrdinal,pow:r.scalePow,sqrt:r.scaleSqrt,quantile:r.scaleQuantile,quantize:r.scaleQuantize,threshold:r.scaleThreshold,time:r.scaleTime,utc:r.scaleUtc,band:l,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}(l().paddingInner(1))},sequential:function e(n){var a=r.scaleLinear(),i=0,c=1,u=!1;function o(){var e=a.domain();i=e[0],c=t.peek(e)-i}function d(e){var r=(e-i)/c;return n(u?Math.max(0,Math.min(1,r)):r)}return d.clamp=function(e){return arguments.length?(u=!!e,d):u},d.domain=function(e){return arguments.length?(a.domain(e),o(),d):a.domain()},d.interpolator=function(e){return arguments.length?(n=e,d):n},d.copy=function(){return e().domain(a.domain()).clamp(u).interpolator(n)},d.ticks=function(e){return a.ticks(e)},d.tickFormat=function(e,n){return a.tickFormat(e,n)},d.nice=function(e){return a.nice(e),o(),d},d},"bin-linear":function e(){var n=r.scaleLinear(),a=[];function i(e){return n(e)}return i.domain=function(e){return arguments.length?(a=s(e),n.domain([a[0],t.peek(a)]),i):a.slice()},i.range=function(e){return arguments.length?(n.range(e),i):n.range()},i.rangeRound=function(e){return arguments.length?(n.rangeRound(e),i):n.rangeRound()},i.interpolate=function(e){return arguments.length?(n.interpolate(e),i):n.interpolate()},i.invert=function(e){return n.invert(e)},i.ticks=function(e){var n=a.length,r=~~(n/(e||n));return r<2?i.domain():a.filter(function(e,n){return!(n%r)})},i.tickFormat=function(){return n.tickFormat.apply(n,arguments)},i.copy=function(){return e().domain(i.domain()).range(i.range())},i},"bin-ordinal":function e(){var r=[],t=[];function a(e){return null==e||e!=e?void 0:t[(n.bisect(r,e)-1)%t.length]}return a.domain=function(e){return arguments.length?(r=s(e),a):r.slice()},a.range=function(e){return arguments.length?(t=b.call(e),a):t.slice()},a.copy=function(){return e().domain(a.domain()).range(a.range())},a}};for(var m in p)g(m,p[m]);function h(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 v=h("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),y=h("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),w=h("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),M=h("4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac"),R=h("4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"),k=new Array(3).concat("67a9cff7f7f7f1a340","0571b092c5defdb863e66101","0571b092c5def7f7f7fdb863e66101","2166ac67a9cfd1e5f0fee0b6f1a340b35806","2166ac67a9cfd1e5f0f7f7f7fee0b6f1a340b35806","2166ac4393c392c5ded1e5f0fee0b6fdb863e08214b35806","2166ac4393c392c5ded1e5f0f7f7f7fee0b6fdb863e08214b35806","0530612166ac4393c392c5ded1e5f0fee0b6fdb863e08214b358067f3b08","0530612166ac4393c392c5ded1e5f0f7f7f7fee0b6fdb863e08214b358067f3b08").map(h),P={blueorange:k},O={category10:a.schemeCategory10,accent:a.schemeAccent,dark2:a.schemeDark2,paired:a.schemePaired,pastel1:a.schemePastel1,pastel2:a.schemePastel2,set1:a.schemeSet1,set2:a.schemeSet2,set3:a.schemeSet3,category20:v,category20b:y,category20c:w,tableau10:M,tableau20:R,viridis:a.interpolateViridis,magma:a.interpolateMagma,inferno:a.interpolateInferno,plasma:a.interpolatePlasma,blueorange:i.interpolateRgbBasis(t.peek(k))};function B(e,n){O[e]=a["interpolate"+n],P[e]=a["scheme"+n]}B("blues","Blues"),B("greens","Greens"),B("greys","Greys"),B("purples","Purples"),B("reds","Reds"),B("oranges","Oranges"),B("brownbluegreen","BrBG"),B("purplegreen","PRGn"),B("pinkyellowgreen","PiYG"),B("purpleorange","PuOr"),B("redblue","RdBu"),B("redgrey","RdGy"),B("redyellowblue","RdYlBu"),B("redyellowgreen","RdYlGn"),B("spectral","Spectral"),B("bluegreen","BuGn"),B("bluepurple","BuPu"),B("greenblue","GnBu"),B("orangered","OrRd"),B("purplebluegreen","PuBuGn"),B("purpleblue","PuBu"),B("purplered","PuRd"),B("redpurple","RdPu"),B("yellowgreenblue","YlGnBu"),B("yellowgreen","YlGn"),B("yelloworangebrown","YlOrBr"),B("yelloworangered","YlOrRd");function q(e,n){var r=n-e;return function(n){return e+n*r}}var x={millisecond:c.timeMillisecond,second:c.timeSecond,minute:c.timeMinute,hour:c.timeHour,day:c.timeDay,week:c.timeWeek,month:c.timeMonth,year:c.timeYear},G={millisecond:c.utcMillisecond,second:c.utcSecond,minute:c.utcMinute,hour:c.utcHour,day:c.utcDay,week:c.utcWeek,month:c.utcMonth,year:c.utcYear};e.scale=g,e.scheme=function(e,n){if(arguments.length>1)return O[e]=n,this;var r=e.split("-");return e=r[0],(r=+r[1]+1)&&P.hasOwnProperty(e)?P[e][r-1]:!r&&O.hasOwnProperty(e)?O[e]:void 0},e.bandSpace=d,e.interpolate=function(e,n){var r,t=i[(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(e,n){var r=n[0],a=t.peek(n)-r;return function(n){return e(r+n*a)}},e.scaleFraction=function(e,n,r){var a=r-n;return a?"linear"===e.type||"sequential"===e.type?function(e){return(e-n)/a}:e.copy().domain([n,r]).range([0,1]).interpolate(q):t.constant(0)},e.timeInterval=function(e){return x.hasOwnProperty(e)&&x[e]},e.utcInterval=function(e){return G.hasOwnProperty(e)&&G[e]},Object.defineProperty(e,"__esModule",{value:!0})}); |
{ | ||
"name": "vega-scale", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Scales and color schemes for visual encoding.", | ||
@@ -33,4 +33,4 @@ "keywords": [ | ||
"d3-interpolate": "1", | ||
"d3-scale": "1", | ||
"d3-scale-chromatic": "^1.1", | ||
"d3-scale": "2", | ||
"d3-scale-chromatic": "^1.2", | ||
"d3-time": "1", | ||
@@ -37,0 +37,0 @@ "vega-util": "1" |
@@ -7,2 +7,14 @@ function colors(specifier) { | ||
export var category20 = colors( | ||
'1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5' | ||
); | ||
export var category20b = colors( | ||
'393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6' | ||
); | ||
export var category20c = colors( | ||
'3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9' | ||
); | ||
export var tableau10 = colors( | ||
@@ -9,0 +21,0 @@ '4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac' |
@@ -1,3 +0,6 @@ | ||
import {tableau10, tableau20, blueOrange} from './palettes'; | ||
import * as $ from 'd3-scale'; | ||
import { | ||
category20, category20b, category20c, | ||
tableau10, tableau20, | ||
blueOrange | ||
} from './palettes'; | ||
import * as _ from 'd3-scale-chromatic'; | ||
@@ -12,9 +15,4 @@ import {interpolateRgbBasis} from 'd3-interpolate'; | ||
var schemes = { | ||
// d3 built-in categorical palettes | ||
category10: $.schemeCategory10, | ||
category20: $.schemeCategory20, | ||
category20b: $.schemeCategory20b, | ||
category20c: $.schemeCategory20c, | ||
// extended categorical palettes | ||
// d3 categorical palettes | ||
category10: _.schemeCategory10, | ||
accent: _.schemeAccent, | ||
@@ -28,10 +26,15 @@ dark2: _.schemeDark2, | ||
set3: _.schemeSet3, | ||
// additional categorical palettes | ||
category20: category20, | ||
category20b: category20b, | ||
category20c: category20c, | ||
tableau10: tableau10, | ||
tableau20: tableau20, | ||
// d3 built-in interpolators | ||
viridis: $.interpolateViridis, | ||
magma: $.interpolateMagma, | ||
inferno: $.interpolateInferno, | ||
plasma: $.interpolatePlasma, | ||
// sequential multi-hue interpolators | ||
viridis: _.interpolateViridis, | ||
magma: _.interpolateMagma, | ||
inferno: _.interpolateInferno, | ||
plasma: _.interpolatePlasma, | ||
@@ -38,0 +41,0 @@ // extended interpolators |
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
48806
1116
18
+ Addedd3-scale@2.2.2(transitive)
- Removedd3-scale@1.0.7(transitive)
Updatedd3-scale@2
Updatedd3-scale-chromatic@^1.2