Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vega-scale

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-scale - npm Package Compare versions

Comparing version 7.1.1 to 7.2.0

74

build/vega-scale.module.js
import { toNumber, peek, hasOwnProperty, toSet, array, constant, isNumber, span, isObject, isString, error, isArray } from 'vega-util';
import { bisectRight, range, bisect } from 'd3-array';
import { scaleOrdinal, tickFormat as tickFormat$1, scaleIdentity, scaleLinear, scaleLog, scalePow, scaleSqrt, scaleSymlog, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, scaleQuantile, scaleQuantize, scaleThreshold } from 'd3-scale';
import * as $ from 'd3-scale';
import { scaleOrdinal, tickFormat as tickFormat$1 } from 'd3-scale';
export { scaleImplicit } from 'd3-scale';
import * as $ from 'd3-interpolate';
import { piecewise } from 'd3-interpolate';
import * as $$1 from 'd3-interpolate';
import { timeInterval, utcInterval } from 'vega-time';

@@ -339,32 +339,32 @@

scale(Identity, scaleIdentity); // continuous scales
scale(Identity, $.scaleIdentity); // continuous scales
scale(Linear, scaleLinear, Continuous);
scale(Log, scaleLog, [Continuous, Log]);
scale(Pow, scalePow, Continuous);
scale(Sqrt, scaleSqrt, Continuous);
scale(Symlog, scaleSymlog, Continuous);
scale(Time, scaleTime, [Continuous, Temporal]);
scale(UTC, scaleUtc, [Continuous, Temporal]); // sequential scales
scale(Linear, $.scaleLinear, Continuous);
scale(Log, $.scaleLog, [Continuous, Log]);
scale(Pow, $.scalePow, Continuous);
scale(Sqrt, $.scaleSqrt, Continuous);
scale(Symlog, $.scaleSymlog, Continuous);
scale(Time, $.scaleTime, [Continuous, Temporal]);
scale(UTC, $.scaleUtc, [Continuous, Temporal]); // sequential scales
scale(Sequential, scaleSequential, [Continuous, Interpolating]); // backwards compat
scale(Sequential, $.scaleSequential, [Continuous, Interpolating]); // backwards compat
scale("".concat(Sequential, "-").concat(Linear), scaleSequential, [Continuous, Interpolating]);
scale("".concat(Sequential, "-").concat(Log), scaleSequentialLog, [Continuous, Interpolating, Log]);
scale("".concat(Sequential, "-").concat(Pow), scaleSequentialPow, [Continuous, Interpolating]);
scale("".concat(Sequential, "-").concat(Sqrt), scaleSequentialSqrt, [Continuous, Interpolating]);
scale("".concat(Sequential, "-").concat(Symlog), scaleSequentialSymlog, [Continuous, Interpolating]); // diverging scales
scale("".concat(Sequential, "-").concat(Linear), $.scaleSequential, [Continuous, Interpolating]);
scale("".concat(Sequential, "-").concat(Log), $.scaleSequentialLog, [Continuous, Interpolating, Log]);
scale("".concat(Sequential, "-").concat(Pow), $.scaleSequentialPow, [Continuous, Interpolating]);
scale("".concat(Sequential, "-").concat(Sqrt), $.scaleSequentialSqrt, [Continuous, Interpolating]);
scale("".concat(Sequential, "-").concat(Symlog), $.scaleSequentialSymlog, [Continuous, Interpolating]); // diverging scales
scale("".concat(Diverging, "-").concat(Linear), scaleDiverging, [Continuous, Interpolating]);
scale("".concat(Diverging, "-").concat(Log), scaleDivergingLog, [Continuous, Interpolating, Log]);
scale("".concat(Diverging, "-").concat(Pow), scaleDivergingPow, [Continuous, Interpolating]);
scale("".concat(Diverging, "-").concat(Sqrt), scaleDivergingSqrt, [Continuous, Interpolating]);
scale("".concat(Diverging, "-").concat(Symlog), scaleDivergingSymlog, [Continuous, Interpolating]); // discretizing scales
scale("".concat(Diverging, "-").concat(Linear), $.scaleDiverging, [Continuous, Interpolating]);
scale("".concat(Diverging, "-").concat(Log), $.scaleDivergingLog, [Continuous, Interpolating, Log]);
scale("".concat(Diverging, "-").concat(Pow), $.scaleDivergingPow, [Continuous, Interpolating]);
scale("".concat(Diverging, "-").concat(Sqrt), $.scaleDivergingSqrt, [Continuous, Interpolating]);
scale("".concat(Diverging, "-").concat(Symlog), $.scaleDivergingSymlog, [Continuous, Interpolating]); // discretizing scales
scale(Quantile, scaleQuantile, [Discretizing, Quantile]);
scale(Quantize, scaleQuantize, Discretizing);
scale(Threshold, scaleThreshold, Discretizing); // discrete scales
scale(Quantile, $.scaleQuantile, [Discretizing, Quantile]);
scale(Quantize, $.scaleQuantize, Discretizing);
scale(Threshold, $.scaleThreshold, Discretizing); // discrete scales
scale(BinOrdinal, scaleBinOrdinal, [Discrete, Discretizing]);
scale(Ordinal, scaleOrdinal, Discrete);
scale(Ordinal, $.scaleOrdinal, Discrete);
scale(Band, band, Discrete);

@@ -412,3 +412,3 @@ scale(Point, point, Discrete);

function interpolateColors(colors, type, gamma) {
return piecewise(interpolate(type || 'rgb', gamma), colors);
return $$1.piecewise(interpolate(type || 'rgb', gamma), colors);
}

@@ -444,3 +444,3 @@ function quantizeInterpolator(interpolator, count) {

function interpolate(type, gamma) {
const interp = $[method(type)];
const interp = $$1[method(type)];
return gamma != null && interp && interp.gamma ? interp.gamma(gamma) : interp;

@@ -810,13 +810,13 @@ }

else if (isDiscrete(scale.type)) {
const d = scale.domain(),
n = d.length,
v = n > max ? d.slice(0, max - 2).map(fmt).join(', ') + ', ending with ' + d.slice(-1).map(fmt) : d.map(fmt).join(', ');
return "".concat(n, " value").concat(n === 1 ? '' : 's', ": ").concat(v);
} // if scale domain is continuous, describe value range
else {
const d = scale.domain();
return "values from ".concat(fmt(d[0]), " to ").concat(fmt(peek(d)));
}
const d = scale.domain(),
n = d.length,
v = n > max ? d.slice(0, max - 2).map(fmt).join(', ') + ', ending with ' + d.slice(-1).map(fmt) : d.map(fmt).join(', ');
return "".concat(n, " value").concat(n === 1 ? '' : 's', ": ").concat(v);
} // if scale domain is continuous, describe value range
else {
const d = scale.domain();
return "values from ".concat(fmt(d[0]), " to ").concat(fmt(peek(d)));
}
}
export { Band, BinOrdinal, DiscreteLegend, Diverging, GradientLegend, Identity, Linear, Log, Ordinal, Point, Pow, Quantile, Quantize, Sequential, Sqrt, SymbolLegend, Symlog, Threshold, Time, UTC, bandSpace, domainCaption, interpolate, interpolateColors, interpolateRange, isContinuous, isDiscrete, isDiscretizing, isInterpolating, isLogarithmic, isQuantile, isTemporal, isValidScaleType, labelFormat, labelFraction, labelValues, quantizeInterpolator, scale, scaleCopy, scaleFraction, scheme, tickCount, tickFormat, tickValues, validTicks };
{
"name": "vega-scale",
"version": "7.1.1",
"version": "7.2.0",
"description": "Scales and color schemes for visual encoding.",

@@ -25,9 +25,9 @@ "keywords": [

"dependencies": {
"d3-array": "^2.7.1",
"d3-interpolate": "^2.0.1",
"d3-scale": "^3.2.2",
"vega-time": "^2.0.4",
"vega-util": "^1.15.2"
"d3-array": "^3.1.1",
"d3-interpolate": "^3.0.1",
"d3-scale": "^4.0.2",
"vega-time": "^2.1.0",
"vega-util": "^1.17.0"
},
"gitHead": "4affcbedb9d14815dbb6d3b250ed231b54fc95c0"
"gitHead": "9a3faca4395cade9ecdfde90af98f1c53e9916b2"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc