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

@vx/stats

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vx/stats - npm Package Compare versions

Comparing version 0.0.198 to 0.0.199

lib/types.d.ts.map

3

esm/BoxPlot.js

@@ -129,4 +129,5 @@ import _pt from "prop-types";

boxplot.container.y1 = Math.min.apply(Math, valueRange);
}
} // eslint-disable-next-line react/jsx-no-useless-fragment
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children(boxplot));

@@ -133,0 +134,0 @@ return /*#__PURE__*/React.createElement(Group, {

@@ -11,2 +11,11 @@ import _pt from "prop-types";

import { line, curveCardinal } from 'd3-shape';
var defaultCountAccessor = function defaultCountAccessor(d) {
return typeof d.count === 'number' ? d.count : 0;
};
var defaultValueAccessor = function defaultValueAccessor(d) {
return typeof d.value === 'number' ? d.value : 0;
};
export default function ViolinPlot(_ref) {

@@ -22,9 +31,5 @@ var _ref$left = _ref.left,

_ref$count = _ref.count,
count = _ref$count === void 0 ? function (d) {
return d && d.count || 0;
} : _ref$count,
count = _ref$count === void 0 ? defaultCountAccessor : _ref$count,
_ref$value = _ref.value,
value = _ref$value === void 0 ? function (d) {
return d && d.value || 0;
} : _ref$value,
value = _ref$value === void 0 ? defaultValueAccessor : _ref$value,
valueScale = _ref.valueScale,

@@ -40,3 +45,4 @@ horizontal = _ref.horizontal,

var widthScale = scaleLinear({
rangeRound: [0, width / 2],
range: [0, width / 2],
round: true,
domain: [0, Math.max.apply(Math, binCounts)]

@@ -74,4 +80,5 @@ });

path = rightCurvePath + " " + leftCurvePath.replace('M', 'L') + " Z";
}
} // eslint-disable-next-line react/jsx-no-useless-fragment
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children({

@@ -78,0 +85,0 @@ path: path

import React from 'react';
import { SharedProps, ChildRenderProps, GenericScale } from './types';
declare type ScaleInput = number;
import { PickD3Scale, ContinuousDomainScaleType } from '@vx/scale';
import { SharedProps, ChildRenderProps } from './types';
export declare type BoxPlotProps = SharedProps & {
/** Scale for converting ScaleInput values to pixel offsets. */
valueScale: GenericScale<ScaleInput>;
/** Scale for converting input values to pixel offsets. */
valueScale: PickD3Scale<ContinuousDomainScaleType, number>;
/** Maximum BoxPlot value. */

@@ -32,3 +32,3 @@ max?: number;

/** Array of outlier values to be rendered. */
outliers?: ScaleInput[];
outliers?: number[];
/** Props to pass to the median glyph line. */

@@ -52,2 +52,2 @@ medianProps?: React.SVGProps<SVGLineElement>;

export default function BoxPlot({ left, top, className, max, min, firstQuartile, thirdQuartile, median, boxWidth, fill, fillOpacity, stroke, strokeWidth, rx, ry, valueScale, outliers, horizontal, medianProps, maxProps, minProps, boxProps, outlierProps, container, containerProps, children, }: BoxPlotProps): JSX.Element;
export {};
//# sourceMappingURL=BoxPlot.d.ts.map

@@ -138,4 +138,5 @@ "use strict";

boxplot.container.y1 = Math.min.apply(Math, valueRange);
}
} // eslint-disable-next-line react/jsx-no-useless-fragment
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children(boxplot));

@@ -142,0 +143,0 @@ return /*#__PURE__*/_react.default.createElement(_group.Group, {

export { default as BoxPlot } from './BoxPlot';
export { default as ViolinPlot } from './ViolinPlot';
export { default as computeStats } from './util/computeStats';
//# sourceMappingURL=index.d.ts.map

@@ -43,6 +43,2 @@ export interface BoxPlot {

};
export interface GenericScale<ScaleInput> {
(input: ScaleInput): number;
range(): number[] | [number, number];
}
export declare type SharedProps = {

@@ -58,1 +54,2 @@ /** Left pixel offset of the glyph. */

};
//# sourceMappingURL=types.d.ts.map

@@ -6,1 +6,2 @@ import { BoxPlot, BinDatum } from '../types';

};
//# sourceMappingURL=computeStats.d.ts.map
import React from 'react';
import { BinDatum, SharedProps, GenericScale } from './types';
export declare type ViolinPlotProps<ScaleInput> = SharedProps & {
import { PickD3Scale, ContinuousDomainScaleType } from '@vx/scale';
import { SharedProps } from './types';
export declare type ViolinPlotProps<Datum extends object> = SharedProps & {
/** Scale for converting values to pixel offsets. */
valueScale: GenericScale<number>;
valueScale: PickD3Scale<ContinuousDomainScaleType, number>;
/** Data used to draw the violin plot glyph. Violin plot values and counts should be able to be derived from data. */
data: ScaleInput[];
/** Given an ScaleInput datum, returns the count for it. */
count?: (d: ScaleInput) => number;
/** Given an ScaleInput datum, returns the value for it. */
value?: (d: ScaleInput) => number;
data: Datum[];
/** Given an datum, returns the count for it. */
count?: (d: Datum) => number;
/** Given an datum, returns the value for it. */
value?: (d: Datum) => number;
/** Width of the violin plot glyph. */

@@ -19,2 +20,3 @@ width?: number;

};
export default function ViolinPlot<ScaleInput extends object = BinDatum>({ left, top, className, data, width, count, value, valueScale, horizontal, children, ...restProps }: ViolinPlotProps<ScaleInput> & Omit<React.SVGProps<SVGPathElement>, keyof ViolinPlotProps<ScaleInput>>): JSX.Element;
export default function ViolinPlot<Datum extends object>({ left, top, className, data, width, count, value, valueScale, horizontal, children, ...restProps }: ViolinPlotProps<Datum> & Omit<React.SVGProps<SVGPathElement>, keyof ViolinPlotProps<Datum>>): JSX.Element;
//# sourceMappingURL=ViolinPlot.d.ts.map

@@ -22,2 +22,10 @@ "use strict";

var defaultCountAccessor = function defaultCountAccessor(d) {
return typeof d.count === 'number' ? d.count : 0;
};
var defaultValueAccessor = function defaultValueAccessor(d) {
return typeof d.value === 'number' ? d.value : 0;
};
function ViolinPlot(_ref) {

@@ -33,9 +41,5 @@ var _ref$left = _ref.left,

_ref$count = _ref.count,
count = _ref$count === void 0 ? function (d) {
return d && d.count || 0;
} : _ref$count,
count = _ref$count === void 0 ? defaultCountAccessor : _ref$count,
_ref$value = _ref.value,
value = _ref$value === void 0 ? function (d) {
return d && d.value || 0;
} : _ref$value,
value = _ref$value === void 0 ? defaultValueAccessor : _ref$value,
valueScale = _ref.valueScale,

@@ -51,3 +55,4 @@ horizontal = _ref.horizontal,

var widthScale = (0, _scale.scaleLinear)({
rangeRound: [0, width / 2],
range: [0, width / 2],
round: true,
domain: [0, Math.max.apply(Math, binCounts)]

@@ -85,4 +90,5 @@ });

path = rightCurvePath + " " + leftCurvePath.replace('M', 'L') + " Z";
}
} // eslint-disable-next-line react/jsx-no-useless-fragment
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children({

@@ -89,0 +95,0 @@ path: path

{
"name": "@vx/stats",
"version": "0.0.198",
"version": "0.0.199",
"description": "vx stats box violin",

@@ -34,4 +34,4 @@ "sideEffects": false,

"@types/react": "*",
"@vx/group": "0.0.198",
"@vx/scale": "0.0.198",
"@vx/group": "0.0.199",
"@vx/scale": "0.0.199",
"classnames": "^2.2.5",

@@ -47,3 +47,3 @@ "d3-shape": "^1.2.0",

},
"gitHead": "4a418928be63a12834accbae246a69136c2e8c19"
"gitHead": "b7fd57c8dede777c4983203046a704f52a61e226"
}

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