Socket
Socket
Sign inDemoInstall

@visx/axis

Package Overview
Dependencies
Maintainers
4
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@visx/axis - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

3

esm/axis/Axis.js
import _pt from "prop-types";
var _excluded = ["children", "axisClassName", "hideAxisLine", "hideTicks", "hideZero", "left", "numTicks", "orientation", "rangePadding", "scale", "tickFormat", "tickLength", "tickValues", "top"];

@@ -41,3 +42,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

top = _ref$top === void 0 ? 0 : _ref$top,
restProps = _objectWithoutPropertiesLoose(_ref, ["children", "axisClassName", "hideAxisLine", "hideTicks", "hideZero", "left", "numTicks", "orientation", "rangePadding", "scale", "tickFormat", "tickLength", "tickValues", "top"]);
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);

@@ -44,0 +45,0 @@ var format = tickFormat != null ? tickFormat : getTickFormatter(scale);

@@ -0,1 +1,3 @@

var _excluded = ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"];
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -10,12 +12,9 @@

export var bottomTickLabelProps = function bottomTickLabelProps() {
return (
/** tickValue, index */
{
dy: '0.25em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'middle'
}
);
return {
dy: '0.25em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'middle'
};
};

@@ -30,3 +29,3 @@ export default function AxisBottom(_ref) {

tickLength = _ref$tickLength === void 0 ? 8 : _ref$tickLength,
restProps = _objectWithoutPropertiesLoose(_ref, ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"]);
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);

@@ -33,0 +32,0 @@ return /*#__PURE__*/React.createElement(Axis, _extends({

@@ -0,1 +1,3 @@

var _excluded = ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"];
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -10,13 +12,10 @@

export var leftTickLabelProps = function leftTickLabelProps() {
return (
/** tickValue, index */
{
dx: '-0.25em',
dy: '0.25em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'end'
}
);
return {
dx: '-0.25em',
dy: '0.25em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'end'
};
};

@@ -31,3 +30,3 @@ export default function AxisLeft(_ref) {

tickLength = _ref$tickLength === void 0 ? 8 : _ref$tickLength,
restProps = _objectWithoutPropertiesLoose(_ref, ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"]);
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);

@@ -34,0 +33,0 @@ return /*#__PURE__*/React.createElement(Axis, _extends({

@@ -43,6 +43,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

tickLabelProps = _ref$tickLabelProps === void 0 ? function () {
return (
/** tickValue, index, tickValues */
defaultTextProps
);
return defaultTextProps;
} : _ref$tickLabelProps,

@@ -49,0 +46,0 @@ _ref$tickLength = _ref.tickLength,

@@ -0,1 +1,3 @@

var _excluded = ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"];
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -10,13 +12,10 @@

export var rightTickLabelProps = function rightTickLabelProps() {
return (
/** tickValue, index */
{
dx: '0.25em',
dy: '0.25em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'start'
}
);
return {
dx: '0.25em',
dy: '0.25em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'start'
};
};

@@ -31,3 +30,3 @@ export default function AxisRight(_ref) {

tickLength = _ref$tickLength === void 0 ? 8 : _ref$tickLength,
restProps = _objectWithoutPropertiesLoose(_ref, ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"]);
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);

@@ -34,0 +33,0 @@ return /*#__PURE__*/React.createElement(Axis, _extends({

@@ -0,1 +1,3 @@

var _excluded = ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"];
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -10,12 +12,9 @@

export var topTickLabelProps = function topTickLabelProps() {
return (
/** tickValue, index */
{
dy: '-0.75em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'middle'
}
);
return {
dy: '-0.75em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'middle'
};
};

@@ -30,3 +29,3 @@ export default function AxisTop(_ref) {

tickLength = _ref$tickLength === void 0 ? 8 : _ref$tickLength,
restProps = _objectWithoutPropertiesLoose(_ref, ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"]);
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);

@@ -33,0 +32,0 @@ return /*#__PURE__*/React.createElement(Axis, _extends({

@@ -26,2 +26,4 @@ "use strict";

var _excluded = ["children", "axisClassName", "hideAxisLine", "hideTicks", "hideZero", "left", "numTicks", "orientation", "rangePadding", "scale", "tickFormat", "tickLength", "tickValues", "top"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -58,3 +60,3 @@

top = _ref$top === void 0 ? 0 : _ref$top,
restProps = _objectWithoutPropertiesLoose(_ref, ["children", "axisClassName", "hideAxisLine", "hideTicks", "hideZero", "left", "numTicks", "orientation", "rangePadding", "scale", "tickFormat", "tickLength", "tickValues", "top"]);
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);

@@ -61,0 +63,0 @@ var format = tickFormat != null ? tickFormat : (0, _getTickFormatter.default)(scale);

@@ -15,2 +15,4 @@ "use strict";

var _excluded = ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -23,12 +25,9 @@

var bottomTickLabelProps = function bottomTickLabelProps() {
return (
/** tickValue, index */
{
dy: '0.25em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'middle'
}
);
return {
dy: '0.25em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'middle'
};
};

@@ -46,3 +45,3 @@

tickLength = _ref$tickLength === void 0 ? 8 : _ref$tickLength,
restProps = _objectWithoutPropertiesLoose(_ref, ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"]);
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);

@@ -49,0 +48,0 @@ return /*#__PURE__*/_react.default.createElement(_Axis.default, _extends({

@@ -15,2 +15,4 @@ "use strict";

var _excluded = ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -23,13 +25,10 @@

var leftTickLabelProps = function leftTickLabelProps() {
return (
/** tickValue, index */
{
dx: '-0.25em',
dy: '0.25em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'end'
}
);
return {
dx: '-0.25em',
dy: '0.25em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'end'
};
};

@@ -47,3 +46,3 @@

tickLength = _ref$tickLength === void 0 ? 8 : _ref$tickLength,
restProps = _objectWithoutPropertiesLoose(_ref, ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"]);
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);

@@ -50,0 +49,0 @@ return /*#__PURE__*/_react.default.createElement(_Axis.default, _extends({

@@ -58,6 +58,3 @@ "use strict";

tickLabelProps = _ref$tickLabelProps === void 0 ? function () {
return (
/** tickValue, index, tickValues */
defaultTextProps
);
return defaultTextProps;
} : _ref$tickLabelProps,

@@ -64,0 +61,0 @@ _ref$tickLength = _ref.tickLength,

@@ -15,2 +15,4 @@ "use strict";

var _excluded = ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -23,13 +25,10 @@

var rightTickLabelProps = function rightTickLabelProps() {
return (
/** tickValue, index */
{
dx: '0.25em',
dy: '0.25em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'start'
}
);
return {
dx: '0.25em',
dy: '0.25em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'start'
};
};

@@ -47,3 +46,3 @@

tickLength = _ref$tickLength === void 0 ? 8 : _ref$tickLength,
restProps = _objectWithoutPropertiesLoose(_ref, ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"]);
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);

@@ -50,0 +49,0 @@ return /*#__PURE__*/_react.default.createElement(_Axis.default, _extends({

@@ -15,2 +15,4 @@ "use strict";

var _excluded = ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -23,12 +25,9 @@

var topTickLabelProps = function topTickLabelProps() {
return (
/** tickValue, index */
{
dy: '-0.75em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'middle'
}
);
return {
dy: '-0.75em',
fill: '#222',
fontFamily: 'Arial',
fontSize: 10,
textAnchor: 'middle'
};
};

@@ -46,3 +45,3 @@

tickLength = _ref$tickLength === void 0 ? 8 : _ref$tickLength,
restProps = _objectWithoutPropertiesLoose(_ref, ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"]);
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);

@@ -49,0 +48,0 @@ return /*#__PURE__*/_react.default.createElement(_Axis.default, _extends({

@@ -43,2 +43,3 @@ "use strict";

if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _types[key]) return;
exports[key] = _types[key];

@@ -45,0 +46,0 @@ });

@@ -1,1 +0,3 @@

"use strict";
"use strict";
exports.__esModule = true;

@@ -0,1 +1,2 @@

import { ScaleInput } from '@visx/scale';
import { TickFormatter, AxisScale } from '../types';

@@ -5,3 +6,3 @@ /**

*/
export default function getTickFormatter<Scale extends AxisScale>(scale: Scale): TickFormatter<Parameters<Scale>[0]>;
export default function getTickFormatter<Scale extends AxisScale>(scale: Scale): TickFormatter<ScaleInput<Scale>>;
//# sourceMappingURL=getTickFormatter.d.ts.map
{
"name": "@visx/axis",
"version": "2.1.1",
"version": "2.1.2",
"description": "visx axis",

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

"@visx/point": "2.1.0",
"@visx/scale": "2.1.0",
"@visx/shape": "2.1.1",
"@visx/text": "2.1.1",
"@visx/scale": "2.1.2",
"@visx/shape": "2.1.2",
"@visx/text": "2.1.2",
"classnames": "^2.3.1",

@@ -47,3 +47,3 @@ "prop-types": "^15.6.0"

},
"gitHead": "3c7b26fef90c76d892dc341cc37a927795e94b2e"
"gitHead": "5da0b5912ee57ad28e83b850e9627ec799a90e3b"
}

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