@vx/legend
Advanced tools
Comparing version 0.0.196 to 0.0.197
@@ -63,4 +63,4 @@ import _pt from "prop-types"; | ||
var labels = domain.map(labelFormatter); | ||
if (children) return React.createElement(React.Fragment, null, children(labels)); | ||
return React.createElement("div", { | ||
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children(labels)); | ||
return /*#__PURE__*/React.createElement("div", { | ||
className: cx('vx-legend', className), | ||
@@ -71,7 +71,7 @@ style: _extends({}, style, { | ||
}, labels.map(function (label, i) { | ||
return React.createElement(LegendItem, _extends({ | ||
return /*#__PURE__*/React.createElement(LegendItem, _extends({ | ||
key: "legend-" + label.text + "-" + i, | ||
margin: itemMargin, | ||
flexDirection: itemDirection | ||
}, legendItemProps), React.createElement(LegendShape, { | ||
}, legendItemProps), /*#__PURE__*/React.createElement(LegendShape, { | ||
shape: shape, | ||
@@ -85,3 +85,3 @@ height: shapeHeight, | ||
shapeStyle: shapeStyle | ||
}), React.createElement(LegendLabel, { | ||
}), /*#__PURE__*/React.createElement(LegendLabel, { | ||
label: label.text, | ||
@@ -88,0 +88,0 @@ flex: labelFlex, |
@@ -20,3 +20,3 @@ import _pt from "prop-types"; | ||
return React.createElement("div", _extends({ | ||
return /*#__PURE__*/React.createElement("div", _extends({ | ||
className: "vx-legend-item", | ||
@@ -23,0 +23,0 @@ style: { |
@@ -19,3 +19,3 @@ import _pt from "prop-types"; | ||
return React.createElement("div", _extends({ | ||
return /*#__PURE__*/React.createElement("div", _extends({ | ||
className: "vx-legend-label", | ||
@@ -22,0 +22,0 @@ style: { |
@@ -18,3 +18,3 @@ import _pt from "prop-types"; | ||
shapeStyle = _ref.shapeStyle; | ||
return React.createElement("div", { | ||
return /*#__PURE__*/React.createElement("div", { | ||
className: "vx-legend-shape", | ||
@@ -21,0 +21,0 @@ style: { |
@@ -24,3 +24,3 @@ import _pt from "prop-types"; | ||
export default function LegendLinear(_ref2) { | ||
export default function Linear(_ref2) { | ||
var scale = _ref2.scale, | ||
@@ -36,3 +36,3 @@ inputDomain = _ref2.domain, | ||
}); | ||
return React.createElement(Legend, _extends({ | ||
return /*#__PURE__*/React.createElement(Legend, _extends({ | ||
scale: scale, | ||
@@ -42,4 +42,4 @@ domain: domain | ||
} | ||
LegendLinear.propTypes = { | ||
Linear.propTypes = { | ||
steps: _pt.number | ||
}; |
@@ -5,4 +5,4 @@ import React from 'react'; | ||
/** Ordinal scales map from strings to an Output type. */ | ||
export default function LegendOrdinal(props) { | ||
return React.createElement(Legend, props); | ||
export default function Ordinal(props) { | ||
return /*#__PURE__*/React.createElement(Legend, props); | ||
} |
@@ -33,3 +33,3 @@ import _pt from "prop-types"; | ||
export default function LegendQuantile(_ref3) { | ||
export default function Quantile(_ref3) { | ||
var inputDomain = _ref3.domain, | ||
@@ -53,3 +53,3 @@ scale = _ref3.scale, | ||
}); | ||
return React.createElement(Legend, _extends({ | ||
return /*#__PURE__*/React.createElement(Legend, _extends({ | ||
scale: scale, | ||
@@ -61,4 +61,4 @@ domain: domain, | ||
} | ||
LegendQuantile.propTypes = { | ||
Quantile.propTypes = { | ||
labelDelimiter: _pt.string | ||
}; |
@@ -29,3 +29,3 @@ import _pt from "prop-types"; | ||
export default function LegendSize(_ref2) { | ||
export default function Size(_ref2) { | ||
var scale = _ref2.scale, | ||
@@ -47,3 +47,3 @@ inputDomain = _ref2.domain, | ||
}); | ||
return React.createElement(Legend, _extends({ | ||
return /*#__PURE__*/React.createElement(Legend, _extends({ | ||
scale: scale, | ||
@@ -55,4 +55,4 @@ domain: domain, | ||
} | ||
LegendSize.propTypes = { | ||
Size.propTypes = { | ||
steps: _pt.number | ||
}; |
@@ -61,3 +61,3 @@ import _pt from "prop-types"; | ||
export default function LegendThreshold(_ref4) { | ||
export default function Threshold(_ref4) { | ||
var scale = _ref4.scale, | ||
@@ -90,3 +90,3 @@ inputDomain = _ref4.domain, | ||
}); | ||
return React.createElement(Legend, _extends({ | ||
return /*#__PURE__*/React.createElement(Legend, _extends({ | ||
scale: scale, | ||
@@ -98,3 +98,3 @@ domain: domain, | ||
} | ||
LegendThreshold.propTypes = { | ||
Threshold.propTypes = { | ||
labelDelimiter: _pt.string, | ||
@@ -101,0 +101,0 @@ labelLower: _pt.string, |
@@ -13,9 +13,9 @@ import _pt from "prop-types"; | ||
var radius = size / 2; | ||
return React.createElement("svg", { | ||
return /*#__PURE__*/React.createElement("svg", { | ||
width: size, | ||
height: size | ||
}, React.createElement(Group, { | ||
}, /*#__PURE__*/React.createElement(Group, { | ||
top: radius, | ||
left: radius | ||
}, React.createElement("circle", { | ||
}, /*#__PURE__*/React.createElement("circle", { | ||
r: radius, | ||
@@ -22,0 +22,0 @@ fill: String(fill), |
@@ -11,3 +11,3 @@ import _pt from "prop-types"; | ||
style = _ref.style; | ||
return React.createElement("div", { | ||
return /*#__PURE__*/React.createElement("div", { | ||
style: _extends({ | ||
@@ -14,0 +14,0 @@ width: width, |
@@ -34,14 +34,14 @@ 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); } | ||
if (shape === 'rect') { | ||
return React.createElement(RectShape, props); | ||
return /*#__PURE__*/React.createElement(RectShape, props); | ||
} | ||
return React.createElement(CircleShape, props); | ||
return /*#__PURE__*/React.createElement(CircleShape, props); | ||
} | ||
if (React.isValidElement(shape)) { | ||
return React.cloneElement(shape, props); | ||
if ( /*#__PURE__*/React.isValidElement(shape)) { | ||
return /*#__PURE__*/React.cloneElement(shape, props); | ||
} | ||
if (shape) { | ||
return React.createElement(shape, props); | ||
return /*#__PURE__*/React.createElement(shape, props); | ||
} | ||
@@ -48,0 +48,0 @@ |
@@ -20,3 +20,3 @@ import React from 'react'; | ||
labelAlign?: string; | ||
/** @vx/scale or d3-scale object used to generate the legend items. */ | ||
/** `@vx/scale` or `d3-scale` object used to generate the legend items. */ | ||
scale: Scale; | ||
@@ -23,0 +23,0 @@ /** Flex-box flex of legend item labels. */ |
@@ -82,4 +82,4 @@ "use strict"; | ||
var labels = domain.map(labelFormatter); | ||
if (children) return _react.default.createElement(_react.default.Fragment, null, children(labels)); | ||
return _react.default.createElement("div", { | ||
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children(labels)); | ||
return /*#__PURE__*/_react.default.createElement("div", { | ||
className: (0, _classnames.default)('vx-legend', className), | ||
@@ -90,7 +90,7 @@ style: _extends({}, style, { | ||
}, labels.map(function (label, i) { | ||
return _react.default.createElement(_LegendItem.default, _extends({ | ||
return /*#__PURE__*/_react.default.createElement(_LegendItem.default, _extends({ | ||
key: "legend-" + label.text + "-" + i, | ||
margin: itemMargin, | ||
flexDirection: itemDirection | ||
}, legendItemProps), _react.default.createElement(_LegendShape.default, { | ||
}, legendItemProps), /*#__PURE__*/_react.default.createElement(_LegendShape.default, { | ||
shape: shape, | ||
@@ -104,3 +104,3 @@ height: shapeHeight, | ||
shapeStyle: shapeStyle | ||
}), _react.default.createElement(_LegendLabel.default, { | ||
}), /*#__PURE__*/_react.default.createElement(_LegendLabel.default, { | ||
label: label.text, | ||
@@ -107,0 +107,0 @@ flex: labelFlex, |
@@ -28,3 +28,3 @@ "use strict"; | ||
return _react.default.createElement("div", _extends({ | ||
return /*#__PURE__*/_react.default.createElement("div", _extends({ | ||
className: "vx-legend-item", | ||
@@ -31,0 +31,0 @@ style: { |
@@ -27,3 +27,3 @@ "use strict"; | ||
return _react.default.createElement("div", _extends({ | ||
return /*#__PURE__*/_react.default.createElement("div", _extends({ | ||
className: "vx-legend-label", | ||
@@ -30,0 +30,0 @@ style: { |
@@ -28,3 +28,3 @@ "use strict"; | ||
shapeStyle = _ref.shapeStyle; | ||
return _react.default.createElement("div", { | ||
return /*#__PURE__*/_react.default.createElement("div", { | ||
className: "vx-legend-shape", | ||
@@ -31,0 +31,0 @@ style: { |
@@ -9,3 +9,3 @@ /// <reference types="react" /> | ||
/** Linear scales map from continuous inputs to continuous outputs. */ | ||
export default function LegendLinear<Output>({ scale, domain: inputDomain, steps, ...restProps }: LegendLinearProps<Output>): JSX.Element; | ||
export default function Linear<Output>({ scale, domain: inputDomain, steps, ...restProps }: LegendLinearProps<Output>): JSX.Element; | ||
//# sourceMappingURL=Linear.d.ts.map |
@@ -5,3 +5,3 @@ "use strict"; | ||
exports.defaultDomain = defaultDomain; | ||
exports.default = LegendLinear; | ||
exports.default = Linear; | ||
@@ -36,3 +36,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
function LegendLinear(_ref2) { | ||
function Linear(_ref2) { | ||
var scale = _ref2.scale, | ||
@@ -48,3 +48,3 @@ inputDomain = _ref2.domain, | ||
}); | ||
return _react.default.createElement(_Legend.default, _extends({ | ||
return /*#__PURE__*/_react.default.createElement(_Legend.default, _extends({ | ||
scale: scale, | ||
@@ -55,4 +55,4 @@ domain: domain | ||
LegendLinear.propTypes = { | ||
Linear.propTypes = { | ||
steps: _propTypes.default.number | ||
}; |
@@ -8,5 +8,5 @@ /// <reference types="react" /> | ||
/** Ordinal scales map from strings to an Output type. */ | ||
export default function LegendOrdinal<Input extends { | ||
export default function Ordinal<Input extends { | ||
toString(): string; | ||
}, Output>(props: LegendOrdinalProps<Input, Output>): JSX.Element; | ||
//# sourceMappingURL=Ordinal.d.ts.map |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = LegendOrdinal; | ||
exports.default = Ordinal; | ||
@@ -13,4 +13,4 @@ var _react = _interopRequireDefault(require("react")); | ||
/** Ordinal scales map from strings to an Output type. */ | ||
function LegendOrdinal(props) { | ||
return _react.default.createElement(_Legend.default, props); | ||
function Ordinal(props) { | ||
return /*#__PURE__*/_react.default.createElement(_Legend.default, props); | ||
} |
@@ -10,3 +10,3 @@ /// <reference types="react" /> | ||
/** A Quantile scale takes a number input and returns an Output. */ | ||
export default function LegendQuantile<Output>({ domain: inputDomain, scale, labelFormat, labelTransform: inputLabelTransform, labelDelimiter, ...restProps }: LegendQuantileProps<Output>): JSX.Element; | ||
export default function Quantile<Output>({ domain: inputDomain, scale, labelFormat, labelTransform: inputLabelTransform, labelDelimiter, ...restProps }: LegendQuantileProps<Output>): JSX.Element; | ||
//# sourceMappingURL=Quantile.d.ts.map |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = LegendQuantile; | ||
exports.default = Quantile; | ||
@@ -41,3 +41,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
function LegendQuantile(_ref3) { | ||
function Quantile(_ref3) { | ||
var inputDomain = _ref3.domain, | ||
@@ -61,3 +61,3 @@ scale = _ref3.scale, | ||
}); | ||
return _react.default.createElement(_Legend.default, _extends({ | ||
return /*#__PURE__*/_react.default.createElement(_Legend.default, _extends({ | ||
scale: scale, | ||
@@ -70,4 +70,4 @@ domain: domain, | ||
LegendQuantile.propTypes = { | ||
Quantile.propTypes = { | ||
labelDelimiter: _propTypes.default.string | ||
}; |
@@ -7,3 +7,3 @@ /// <reference types="react" /> | ||
} & LegendProps<Datum, number, ScaleType<Datum, number>>; | ||
export default function LegendSize<Datum>({ scale, domain: inputDomain, steps, labelFormat, labelTransform, ...restProps }: LegendSizeProps<Datum>): JSX.Element; | ||
export default function Size<Datum>({ scale, domain: inputDomain, steps, labelFormat, labelTransform, ...restProps }: LegendSizeProps<Datum>): JSX.Element; | ||
//# sourceMappingURL=Size.d.ts.map |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = LegendSize; | ||
exports.default = Size; | ||
@@ -38,3 +38,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
function LegendSize(_ref2) { | ||
function Size(_ref2) { | ||
var scale = _ref2.scale, | ||
@@ -56,3 +56,3 @@ inputDomain = _ref2.domain, | ||
}); | ||
return _react.default.createElement(_Legend.default, _extends({ | ||
return /*#__PURE__*/_react.default.createElement(_Legend.default, _extends({ | ||
scale: scale, | ||
@@ -65,4 +65,4 @@ domain: domain, | ||
LegendSize.propTypes = { | ||
Size.propTypes = { | ||
steps: _propTypes.default.number | ||
}; |
@@ -10,3 +10,3 @@ /// <reference types="react" /> | ||
}; | ||
export default function LegendThreshold<Datum extends StringNumberDate, Output>({ scale, domain: inputDomain, labelFormat, labelTransform: inputLabelTransform, labelDelimiter, labelLower, labelUpper, ...restProps }: LegendThresholdProps<Datum, Output>): JSX.Element; | ||
export default function Threshold<Datum extends StringNumberDate, Output>({ scale, domain: inputDomain, labelFormat, labelTransform: inputLabelTransform, labelDelimiter, labelLower, labelUpper, ...restProps }: LegendThresholdProps<Datum, Output>): JSX.Element; | ||
//# sourceMappingURL=Threshold.d.ts.map |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = LegendThreshold; | ||
exports.default = Threshold; | ||
@@ -69,3 +69,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
function LegendThreshold(_ref4) { | ||
function Threshold(_ref4) { | ||
var scale = _ref4.scale, | ||
@@ -98,3 +98,3 @@ inputDomain = _ref4.domain, | ||
}); | ||
return _react.default.createElement(_Legend.default, _extends({ | ||
return /*#__PURE__*/_react.default.createElement(_Legend.default, _extends({ | ||
scale: scale, | ||
@@ -107,3 +107,3 @@ domain: domain, | ||
LegendThreshold.propTypes = { | ||
Threshold.propTypes = { | ||
labelDelimiter: _propTypes.default.string, | ||
@@ -110,0 +110,0 @@ labelLower: _propTypes.default.string, |
@@ -23,9 +23,9 @@ "use strict"; | ||
var radius = size / 2; | ||
return _react.default.createElement("svg", { | ||
return /*#__PURE__*/_react.default.createElement("svg", { | ||
width: size, | ||
height: size | ||
}, _react.default.createElement(_group.Group, { | ||
}, /*#__PURE__*/_react.default.createElement(_group.Group, { | ||
top: radius, | ||
left: radius | ||
}, _react.default.createElement("circle", { | ||
}, /*#__PURE__*/_react.default.createElement("circle", { | ||
r: radius, | ||
@@ -32,0 +32,0 @@ fill: String(fill), |
@@ -19,3 +19,3 @@ "use strict"; | ||
style = _ref.style; | ||
return _react.default.createElement("div", { | ||
return /*#__PURE__*/_react.default.createElement("div", { | ||
style: _extends({ | ||
@@ -22,0 +22,0 @@ width: width, |
@@ -43,14 +43,14 @@ "use strict"; | ||
if (shape === 'rect') { | ||
return _react.default.createElement(_Rect.default, props); | ||
return /*#__PURE__*/_react.default.createElement(_Rect.default, props); | ||
} | ||
return _react.default.createElement(_Circle.default, props); | ||
return /*#__PURE__*/_react.default.createElement(_Circle.default, props); | ||
} | ||
if (_react.default.isValidElement(shape)) { | ||
return _react.default.cloneElement(shape, props); | ||
if ( /*#__PURE__*/_react.default.isValidElement(shape)) { | ||
return /*#__PURE__*/_react.default.cloneElement(shape, props); | ||
} | ||
if (shape) { | ||
return _react.default.createElement(shape, props); | ||
return /*#__PURE__*/_react.default.createElement(shape, props); | ||
} | ||
@@ -57,0 +57,0 @@ |
{ | ||
"name": "@vx/legend", | ||
"version": "0.0.196", | ||
"version": "0.0.197", | ||
"description": "vx legend", | ||
@@ -13,5 +13,2 @@ "sideEffects": false, | ||
], | ||
"scripts": { | ||
"docs": "cd ./docs && ../../../node_modules/.bin/react-docgen ../src/{legends,shapes} | ../../../scripts/buildDocs.sh" | ||
}, | ||
"repository": { | ||
@@ -44,3 +41,3 @@ "type": "git", | ||
"@types/react": "*", | ||
"@vx/group": "0.0.196", | ||
"@vx/group": "0.0.197", | ||
"classnames": "^2.2.5", | ||
@@ -50,5 +47,5 @@ "prop-types": "^15.5.10" | ||
"devDependencies": { | ||
"@vx/scale": "0.0.196" | ||
"@vx/scale": "0.0.197" | ||
}, | ||
"gitHead": "0b9ff48c735be9a9273f38750120e7fe2fb2caaf" | ||
"gitHead": "c56b64bfbedde9ca06255b2eeff84b52c49d57ea" | ||
} |
250
Readme.md
@@ -7,3 +7,3 @@ # @vx/legend | ||
Legends associate shapes and colors to data. | ||
Legends associate shapes and colors to data, and are associated with scales. | ||
@@ -18,3 +18,3 @@ ## Example | ||
domain: [0.02, 0.04, 0.06, 0.08, 0.1], | ||
range: ['#f2f0f7', '#dadaeb', '#bcbddc', '#9e9ac8', '#756bb1', '#54278f'] | ||
range: ['#f2f0f7', '#dadaeb', '#bcbddc', '#9e9ac8', '#756bb1', '#54278f'], | ||
}); | ||
@@ -38,3 +38,2 @@ | ||
## Installation | ||
@@ -45,246 +44,1 @@ | ||
``` | ||
## Components | ||
- [Legend](#legend-) | ||
- [LegendItem](#legenditem-) | ||
- [LegendLabel](#legendlabel-) | ||
- [LegendShape](#legendshape-) | ||
- [Linear](#linear-) | ||
- [Ordinal](#ordinal-) | ||
- [Quantile](#quantile-) | ||
- [Size](#size-) | ||
- [Threshold](#threshold-) | ||
- [Circle](#circle-) | ||
- [Rect](#rect-) | ||
## API | ||
<h3 id="legend-"><Legend /></h3> | ||
<a id="#Legend__children" name="Legend__children" href="#Legend__children">#</a> *Legend*.**children**<func> | ||
<a id="#Legend__className" name="Legend__className" href="#Legend__className">#</a> *Legend*.**className**<string> | ||
<a id="#Legend__direction" name="Legend__direction" href="#Legend__direction">#</a> *Legend*.**direction**<string> <table><tr><td><strong>Default</strong></td><td>'column'</td></td></table> | ||
<a id="#Legend__domain" name="Legend__domain" href="#Legend__domain">#</a> *Legend*.**domain**<array> | ||
<a id="#Legend__fill" name="Legend__fill" href="#Legend__fill">#</a> *Legend*.**fill**<any> <table><tr><td><strong>Default</strong></td><td>valueOrIdentity</td></td></table> | ||
<a id="#Legend__itemDirection" name="Legend__itemDirection" href="#Legend__itemDirection">#</a> *Legend*.**itemDirection**<string> <table><tr><td><strong>Default</strong></td><td>'row'</td></td></table> | ||
<a id="#Legend__itemMargin" name="Legend__itemMargin" href="#Legend__itemMargin">#</a> *Legend*.**itemMargin**<string> <table><tr><td><strong>Default</strong></td><td>'0'</td></td></table> | ||
<a id="#Legend__labelAlign" name="Legend__labelAlign" href="#Legend__labelAlign">#</a> *Legend*.**labelAlign**<string> <table><tr><td><strong>Default</strong></td><td>'left'</td></td></table> | ||
<a id="#Legend__labelFlex" name="Legend__labelFlex" href="#Legend__labelFlex">#</a> *Legend*.**labelFlex**<string> <table><tr><td><strong>Default</strong></td><td>'1'</td></td></table> | ||
<a id="#Legend__labelFormat" name="Legend__labelFormat" href="#Legend__labelFormat">#</a> *Legend*.**labelFormat**<func> <table><tr><td><strong>Default</strong></td><td>valueOrIdentity</td></td></table> | ||
<a id="#Legend__labelMargin" name="Legend__labelMargin" href="#Legend__labelMargin">#</a> *Legend*.**labelMargin**<string> <table><tr><td><strong>Default</strong></td><td>'0 4px'</td></td></table> | ||
<a id="#Legend__labelTransform" name="Legend__labelTransform" href="#Legend__labelTransform">#</a> *Legend*.**labelTransform**<func> <table><tr><td><strong>Default</strong></td><td>function defaultTransform({ scale, labelFormat }) { | ||
return (d, i) => { | ||
return { | ||
datum: d, | ||
index: i, | ||
text: `${labelFormat(d, i)}`, | ||
value: scale(d), | ||
}; | ||
}; | ||
}</td></td></table> | ||
<a id="#Legend__scale" name="Legend__scale" href="#Legend__scale">#</a> *Legend*.**scale**<union(func|object)> `required` | ||
<a id="#Legend__shape" name="Legend__shape" href="#Legend__shape">#</a> *Legend*.**shape**<any> | ||
<a id="#Legend__shapeHeight" name="Legend__shapeHeight" href="#Legend__shapeHeight">#</a> *Legend*.**shapeHeight**<union(number|string)> <table><tr><td><strong>Default</strong></td><td>15</td></td></table> | ||
<a id="#Legend__shapeMargin" name="Legend__shapeMargin" href="#Legend__shapeMargin">#</a> *Legend*.**shapeMargin**<any> <table><tr><td><strong>Default</strong></td><td>'2px 4px 2px 0'</td></td></table> | ||
<a id="#Legend__shapeStyle" name="Legend__shapeStyle" href="#Legend__shapeStyle">#</a> *Legend*.**shapeStyle**<any> | ||
<a id="#Legend__shapeWidth" name="Legend__shapeWidth" href="#Legend__shapeWidth">#</a> *Legend*.**shapeWidth**<union(number|string)> <table><tr><td><strong>Default</strong></td><td>15</td></td></table> | ||
<a id="#Legend__size" name="Legend__size" href="#Legend__size">#</a> *Legend*.**size**<any> <table><tr><td><strong>Default</strong></td><td>valueOrIdentity</td></td></table> | ||
<a id="#Legend__style" name="Legend__style" href="#Legend__style">#</a> *Legend*.**style**<any> <table><tr><td><strong>Default</strong></td><td>{ | ||
display: 'flex', | ||
}</td></td></table> | ||
<h3 id="legenditem-"><LegendItem /></h3> | ||
<a id="#LegendItem__alignItems" name="LegendItem__alignItems" href="#LegendItem__alignItems">#</a> *LegendItem*.**alignItems**<string> <table><tr><td><strong>Default</strong></td><td>'center'</td></td></table> | ||
<a id="#LegendItem__children" name="LegendItem__children" href="#LegendItem__children">#</a> *LegendItem*.**children**<any> | ||
<a id="#LegendItem__display" name="LegendItem__display" href="#LegendItem__display">#</a> *LegendItem*.**display**<string> <table><tr><td><strong>Default</strong></td><td>'flex'</td></td></table> | ||
<a id="#LegendItem__flexDirection" name="LegendItem__flexDirection" href="#LegendItem__flexDirection">#</a> *LegendItem*.**flexDirection**<string> <table><tr><td><strong>Default</strong></td><td>'row'</td></td></table> | ||
<a id="#LegendItem__margin" name="LegendItem__margin" href="#LegendItem__margin">#</a> *LegendItem*.**margin**<union(string|number)> <table><tr><td><strong>Default</strong></td><td>'0'</td></td></table> | ||
<h3 id="legendlabel-"><LegendLabel /></h3> | ||
<a id="#LegendLabel__align" name="LegendLabel__align" href="#LegendLabel__align">#</a> *LegendLabel*.**align**<string> <table><tr><td><strong>Default</strong></td><td>'left'</td></td></table> | ||
<a id="#LegendLabel__children" name="LegendLabel__children" href="#LegendLabel__children">#</a> *LegendLabel*.**children**<any> | ||
<a id="#LegendLabel__flex" name="LegendLabel__flex" href="#LegendLabel__flex">#</a> *LegendLabel*.**flex**<union(string|number)> <table><tr><td><strong>Default</strong></td><td>'1'</td></td></table> | ||
<a id="#LegendLabel__label" name="LegendLabel__label" href="#LegendLabel__label">#</a> *LegendLabel*.**label**<any> | ||
<a id="#LegendLabel__margin" name="LegendLabel__margin" href="#LegendLabel__margin">#</a> *LegendLabel*.**margin**<union(string|number)> <table><tr><td><strong>Default</strong></td><td>'5px 0'</td></td></table> | ||
<h3 id="legendshape-"><LegendShape /></h3> | ||
<a id="#LegendShape__fill" name="LegendShape__fill" href="#LegendShape__fill">#</a> *LegendShape*.**fill**<any> | ||
<a id="#LegendShape__height" name="LegendShape__height" href="#LegendShape__height">#</a> *LegendShape*.**height**<any> | ||
<a id="#LegendShape__label" name="LegendShape__label" href="#LegendShape__label">#</a> *LegendShape*.**label**<any> | ||
<a id="#LegendShape__margin" name="LegendShape__margin" href="#LegendShape__margin">#</a> *LegendShape*.**margin**<any> | ||
<a id="#LegendShape__shape" name="LegendShape__shape" href="#LegendShape__shape">#</a> *LegendShape*.**shape**<any> <table><tr><td><strong>Default</strong></td><td>ShapeRect</td></td></table> | ||
<a id="#LegendShape__shapeStyle" name="LegendShape__shapeStyle" href="#LegendShape__shapeStyle">#</a> *LegendShape*.**shapeStyle**<any> | ||
<a id="#LegendShape__size" name="LegendShape__size" href="#LegendShape__size">#</a> *LegendShape*.**size**<any> | ||
<a id="#LegendShape__width" name="LegendShape__width" href="#LegendShape__width">#</a> *LegendShape*.**width**<any> | ||
<h3 id="linear-"><Linear /></h3> | ||
<a id="#Linear__domain" name="Linear__domain" href="#Linear__domain">#</a> *Linear*.**domain**<array> | ||
<a id="#Linear__labelFormat" name="Linear__labelFormat" href="#Linear__labelFormat">#</a> *Linear*.**labelFormat**<func> <table><tr><td><strong>Default</strong></td><td>x => x</td></td></table> | ||
<a id="#Linear__labelTransform" name="Linear__labelTransform" href="#Linear__labelTransform">#</a> *Linear*.**labelTransform**<func> <table><tr><td><strong>Default</strong></td><td>function defaultTransform({ scale, labelFormat }) { | ||
return (d, i) => { | ||
return { | ||
text: `${labelFormat(d, i)}`, | ||
value: scale(d), | ||
}; | ||
}; | ||
}</td></td></table> | ||
<a id="#Linear__scale" name="Linear__scale" href="#Linear__scale">#</a> *Linear*.**scale**<func> `required` | ||
<a id="#Linear__steps" name="Linear__steps" href="#Linear__steps">#</a> *Linear*.**steps**<number> <table><tr><td><strong>Default</strong></td><td>5</td></td></table> | ||
<h3 id="ordinal-"><Ordinal /></h3> | ||
<a id="#Ordinal__domain" name="Ordinal__domain" href="#Ordinal__domain">#</a> *Ordinal*.**domain**<array> | ||
<a id="#Ordinal__labelFormat" name="Ordinal__labelFormat" href="#Ordinal__labelFormat">#</a> *Ordinal*.**labelFormat**<func> <table><tr><td><strong>Default</strong></td><td>valueOrIdentity</td></td></table> | ||
<a id="#Ordinal__labelTransform" name="Ordinal__labelTransform" href="#Ordinal__labelTransform">#</a> *Ordinal*.**labelTransform**<func> <table><tr><td><strong>Default</strong></td><td>function defaultTransform({ scale, labelFormat }) { | ||
return (d, i) => { | ||
return { | ||
datum: d, | ||
index: i, | ||
text: `${labelFormat(d, i)}`, | ||
value: scale(d), | ||
}; | ||
}; | ||
}</td></td></table> | ||
<a id="#Ordinal__scale" name="Ordinal__scale" href="#Ordinal__scale">#</a> *Ordinal*.**scale**<func> `required` | ||
<h3 id="quantile-"><Quantile /></h3> | ||
<a id="#Quantile__domain" name="Quantile__domain" href="#Quantile__domain">#</a> *Quantile*.**domain**<array> | ||
<a id="#Quantile__labelDelimiter" name="Quantile__labelDelimiter" href="#Quantile__labelDelimiter">#</a> *Quantile*.**labelDelimiter**<string> <table><tr><td><strong>Default</strong></td><td>'-'</td></td></table> | ||
<a id="#Quantile__labelFormat" name="Quantile__labelFormat" href="#Quantile__labelFormat">#</a> *Quantile*.**labelFormat**<func> <table><tr><td><strong>Default</strong></td><td>x => x</td></td></table> | ||
<a id="#Quantile__labelTransform" name="Quantile__labelTransform" href="#Quantile__labelTransform">#</a> *Quantile*.**labelTransform**<func> | ||
<a id="#Quantile__scale" name="Quantile__scale" href="#Quantile__scale">#</a> *Quantile*.**scale**<func> `required` | ||
<h3 id="size-"><Size /></h3> | ||
<a id="#Size__domain" name="Size__domain" href="#Size__domain">#</a> *Size*.**domain**<array> | ||
<a id="#Size__labelFormat" name="Size__labelFormat" href="#Size__labelFormat">#</a> *Size*.**labelFormat**<func> <table><tr><td><strong>Default</strong></td><td>x => x</td></td></table> | ||
<a id="#Size__labelTransform" name="Size__labelTransform" href="#Size__labelTransform">#</a> *Size*.**labelTransform**<func> <table><tr><td><strong>Default</strong></td><td>function defaultTransform({ scale, labelFormat }) { | ||
return (d, i) => { | ||
return { | ||
text: `${labelFormat(d, i)}`, | ||
value: scale(d), | ||
datum: d, | ||
index: i, | ||
}; | ||
}; | ||
}</td></td></table> | ||
<a id="#Size__scale" name="Size__scale" href="#Size__scale">#</a> *Size*.**scale**<func> `required` | ||
<a id="#Size__steps" name="Size__steps" href="#Size__steps">#</a> *Size*.**steps**<number> <table><tr><td><strong>Default</strong></td><td>5</td></td></table> | ||
<h3 id="threshold-"><Threshold /></h3> | ||
<a id="#Threshold__domain" name="Threshold__domain" href="#Threshold__domain">#</a> *Threshold*.**domain**<array> | ||
<a id="#Threshold__labelDelimiter" name="Threshold__labelDelimiter" href="#Threshold__labelDelimiter">#</a> *Threshold*.**labelDelimiter**<string> <table><tr><td><strong>Default</strong></td><td>'to'</td></td></table> | ||
<a id="#Threshold__labelFormat" name="Threshold__labelFormat" href="#Threshold__labelFormat">#</a> *Threshold*.**labelFormat**<func> <table><tr><td><strong>Default</strong></td><td>x => x</td></td></table> | ||
<a id="#Threshold__labelLower" name="Threshold__labelLower" href="#Threshold__labelLower">#</a> *Threshold*.**labelLower**<string> <table><tr><td><strong>Default</strong></td><td>'Less than '</td></td></table> | ||
<a id="#Threshold__labelTransform" name="Threshold__labelTransform" href="#Threshold__labelTransform">#</a> *Threshold*.**labelTransform**<func> | ||
<a id="#Threshold__labelUpper" name="Threshold__labelUpper" href="#Threshold__labelUpper">#</a> *Threshold*.**labelUpper**<string> <table><tr><td><strong>Default</strong></td><td>'More than '</td></td></table> | ||
<a id="#Threshold__scale" name="Threshold__scale" href="#Threshold__scale">#</a> *Threshold*.**scale**<func> `required` | ||
<h3 id="circle-"><Circle /></h3> | ||
<a id="#Circle__fill" name="Circle__fill" href="#Circle__fill">#</a> *Circle*.**fill**<any> | ||
<a id="#Circle__height" name="Circle__height" href="#Circle__height">#</a> *Circle*.**height**<union(number|string)> | ||
<a id="#Circle__style" name="Circle__style" href="#Circle__style">#</a> *Circle*.**style**<object> | ||
<a id="#Circle__width" name="Circle__width" href="#Circle__width">#</a> *Circle*.**width**<union(number|string)> | ||
<h3 id="rect-"><Rect /></h3> | ||
<a id="#Rect__fill" name="Rect__fill" href="#Rect__fill">#</a> *Rect*.**fill**<any> | ||
<a id="#Rect__height" name="Rect__height" href="#Rect__height">#</a> *Rect*.**height**<union(number|string)> | ||
<a id="#Rect__style" name="Rect__style" href="#Rect__style">#</a> *Rect*.**style**<object> | ||
<a id="#Rect__width" name="Rect__width" href="#Rect__width">#</a> *Rect*.**width**<union(number|string)> |
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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
105523
75
1864
41
1
+ Added@vx/group@0.0.197(transitive)
- Removed@vx/group@0.0.196(transitive)
Updated@vx/group@0.0.197