@visx/axis
Advanced tools
Comparing version 1.16.0 to 1.17.0
@@ -40,2 +40,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); } | ||
tickComponent = _ref.tickComponent, | ||
tickLineProps = _ref.tickLineProps, | ||
_ref$tickLabelProps = _ref.tickLabelProps, | ||
@@ -75,3 +76,5 @@ tickLabelProps = _ref$tickLabelProps === void 0 ? function () { | ||
tickTransform: tickTransform, | ||
ticks: ticks | ||
ticks: ticks, | ||
strokeWidth: strokeWidth, | ||
tickLineProps: tickLineProps | ||
}), !hideAxisLine && /*#__PURE__*/React.createElement(Line, { | ||
@@ -78,0 +81,0 @@ className: cx('visx-axis-line', axisLineClassName), |
@@ -19,3 +19,5 @@ 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); } | ||
tickTransform = _ref.tickTransform, | ||
ticks = _ref.ticks; | ||
ticks = _ref.ticks, | ||
strokeWidth = _ref.strokeWidth, | ||
tickLineProps = _ref.tickLineProps; | ||
return ticks.map(function (_ref2) { | ||
@@ -36,8 +38,9 @@ var _allTickLabelProps$in; | ||
transform: tickTransform | ||
}, !hideTicks && /*#__PURE__*/React.createElement(Line, { | ||
}, !hideTicks && /*#__PURE__*/React.createElement(Line, _extends({ | ||
from: from, | ||
to: to, | ||
stroke: tickStroke, | ||
strokeWidth: strokeWidth, | ||
strokeLinecap: "square" | ||
}), tickComponent ? tickComponent(_extends({}, tickLabelProps, { | ||
}, tickLineProps)), tickComponent ? tickComponent(_extends({}, tickLabelProps, { | ||
x: to.x, | ||
@@ -44,0 +47,0 @@ y: tickYCoord, |
/// <reference types="react" /> | ||
import { AxisRendererProps, AxisScale } from '../types'; | ||
export default function AxisRenderer<Scale extends AxisScale>({ axisFromPoint, axisLineClassName, axisToPoint, hideAxisLine, hideTicks, horizontal, label, labelClassName, labelOffset, labelProps, orientation, scale, stroke, strokeDasharray, strokeWidth, tickClassName, tickComponent, tickLabelProps, tickLength, tickStroke, tickTransform, ticks, ticksComponent, }: AxisRendererProps<Scale>): JSX.Element; | ||
export default function AxisRenderer<Scale extends AxisScale>({ axisFromPoint, axisLineClassName, axisToPoint, hideAxisLine, hideTicks, horizontal, label, labelClassName, labelOffset, labelProps, orientation, scale, stroke, strokeDasharray, strokeWidth, tickClassName, tickComponent, tickLineProps, tickLabelProps, tickLength, tickStroke, tickTransform, ticks, ticksComponent, }: AxisRendererProps<Scale>): JSX.Element; | ||
//# sourceMappingURL=AxisRenderer.d.ts.map |
@@ -55,2 +55,3 @@ "use strict"; | ||
tickComponent = _ref.tickComponent, | ||
tickLineProps = _ref.tickLineProps, | ||
_ref$tickLabelProps = _ref.tickLabelProps, | ||
@@ -90,3 +91,5 @@ tickLabelProps = _ref$tickLabelProps === void 0 ? function () { | ||
tickTransform: tickTransform, | ||
ticks: ticks | ||
ticks: ticks, | ||
strokeWidth: strokeWidth, | ||
tickLineProps: tickLineProps | ||
}), !hideAxisLine && /*#__PURE__*/_react.default.createElement(_shape.Line, { | ||
@@ -93,0 +96,0 @@ className: (0, _classnames.default)('visx-axis-line', axisLineClassName), |
/// <reference types="react" /> | ||
import { TicksRendererProps, AxisScale } from '../types'; | ||
export default function Ticks<Scale extends AxisScale>({ hideTicks, horizontal, orientation, tickClassName, tickComponent, tickLabelProps: allTickLabelProps, tickStroke, tickTransform, ticks, }: TicksRendererProps<Scale>): JSX.Element[]; | ||
export default function Ticks<Scale extends AxisScale>({ hideTicks, horizontal, orientation, tickClassName, tickComponent, tickLabelProps: allTickLabelProps, tickStroke, tickTransform, ticks, strokeWidth, tickLineProps, }: TicksRendererProps<Scale>): JSX.Element[]; | ||
//# sourceMappingURL=Ticks.d.ts.map |
@@ -32,3 +32,5 @@ "use strict"; | ||
tickTransform = _ref.tickTransform, | ||
ticks = _ref.ticks; | ||
ticks = _ref.ticks, | ||
strokeWidth = _ref.strokeWidth, | ||
tickLineProps = _ref.tickLineProps; | ||
return ticks.map(function (_ref2) { | ||
@@ -49,8 +51,9 @@ var _allTickLabelProps$in; | ||
transform: tickTransform | ||
}, !hideTicks && /*#__PURE__*/_react.default.createElement(_shape.Line, { | ||
}, !hideTicks && /*#__PURE__*/_react.default.createElement(_shape.Line, _extends({ | ||
from: from, | ||
to: to, | ||
stroke: tickStroke, | ||
strokeWidth: strokeWidth, | ||
strokeLinecap: "square" | ||
}), tickComponent ? tickComponent(_extends({}, tickLabelProps, { | ||
}, tickLineProps)), tickComponent ? tickComponent(_extends({}, tickLabelProps, { | ||
x: to.x, | ||
@@ -57,0 +60,0 @@ y: tickYCoord, |
@@ -8,2 +8,3 @@ /// <reference types="react" /> | ||
export declare type AxisScale<Output extends AxisScaleOutput = AxisScaleOutput> = D3Scale<Output, any, any>; | ||
declare type LineProps = Omit<React.SVGProps<SVGLineElement>, 'to' | 'from'>; | ||
declare type FormattedValue = string | undefined; | ||
@@ -25,3 +26,3 @@ export declare type TickFormatter<T> = (value: T, index: number, values: { | ||
tickLabelProps: Partial<TextProps>[]; | ||
} & Pick<AxisRendererProps<Scale>, 'hideTicks' | 'horizontal' | 'orientation' | 'scale' | 'tickClassName' | 'tickComponent' | 'tickStroke' | 'tickTransform' | 'ticks'>; | ||
} & Pick<AxisRendererProps<Scale>, 'hideTicks' | 'horizontal' | 'orientation' | 'scale' | 'tickClassName' | 'tickComponent' | 'tickStroke' | 'tickTransform' | 'ticks' | 'strokeWidth' | 'tickLineProps'>; | ||
export declare type CommonProps<Scale extends AxisScale> = { | ||
@@ -56,2 +57,4 @@ /** The class name applied to the axis line element. */ | ||
strokeDasharray?: string; | ||
/** Props to be applied to individual tick lines. */ | ||
tickLineProps?: LineProps; | ||
/** The class name applied to each tick group. */ | ||
@@ -58,0 +61,0 @@ tickClassName?: string; |
{ | ||
"name": "@visx/axis", | ||
"version": "1.16.0", | ||
"version": "1.17.0", | ||
"description": "visx axis", | ||
@@ -47,3 +47,3 @@ "sideEffects": false, | ||
}, | ||
"gitHead": "1b549312c37f23d7145b518ca00fcc889d3cb47a" | ||
"gitHead": "a35a8e6f6cb94a613910cc0bc5a097f4421dab09" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
69275
1240