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

@vx/legend

Package Overview
Dependencies
Maintainers
3
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vx/legend - npm Package Compare versions

Comparing version 0.0.196 to 0.0.197

10

esm/legends/Legend/index.js

@@ -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"
}

@@ -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-">&lt;Legend /&gt;</h3>
<a id="#Legend__children" name="Legend__children" href="#Legend__children">#</a> *Legend*.**children**&lt;func&gt;
<a id="#Legend__className" name="Legend__className" href="#Legend__className">#</a> *Legend*.**className**&lt;string&gt;
<a id="#Legend__direction" name="Legend__direction" href="#Legend__direction">#</a> *Legend*.**direction**&lt;string&gt; <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**&lt;array&gt;
<a id="#Legend__fill" name="Legend__fill" href="#Legend__fill">#</a> *Legend*.**fill**&lt;any&gt; <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**&lt;string&gt; <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**&lt;string&gt; <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**&lt;string&gt; <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**&lt;string&gt; <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**&lt;func&gt; <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**&lt;string&gt; <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**&lt;func&gt; <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**&lt;union(func|object)&gt; `required`
<a id="#Legend__shape" name="Legend__shape" href="#Legend__shape">#</a> *Legend*.**shape**&lt;any&gt;
<a id="#Legend__shapeHeight" name="Legend__shapeHeight" href="#Legend__shapeHeight">#</a> *Legend*.**shapeHeight**&lt;union(number|string)&gt; <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**&lt;any&gt; <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**&lt;any&gt;
<a id="#Legend__shapeWidth" name="Legend__shapeWidth" href="#Legend__shapeWidth">#</a> *Legend*.**shapeWidth**&lt;union(number|string)&gt; <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**&lt;any&gt; <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**&lt;any&gt; <table><tr><td><strong>Default</strong></td><td>{
display: 'flex',
}</td></td></table>
<h3 id="legenditem-">&lt;LegendItem /&gt;</h3>
<a id="#LegendItem__alignItems" name="LegendItem__alignItems" href="#LegendItem__alignItems">#</a> *LegendItem*.**alignItems**&lt;string&gt; <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**&lt;any&gt;
<a id="#LegendItem__display" name="LegendItem__display" href="#LegendItem__display">#</a> *LegendItem*.**display**&lt;string&gt; <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**&lt;string&gt; <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**&lt;union(string|number)&gt; <table><tr><td><strong>Default</strong></td><td>'0'</td></td></table>
<h3 id="legendlabel-">&lt;LegendLabel /&gt;</h3>
<a id="#LegendLabel__align" name="LegendLabel__align" href="#LegendLabel__align">#</a> *LegendLabel*.**align**&lt;string&gt; <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**&lt;any&gt;
<a id="#LegendLabel__flex" name="LegendLabel__flex" href="#LegendLabel__flex">#</a> *LegendLabel*.**flex**&lt;union(string|number)&gt; <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**&lt;any&gt;
<a id="#LegendLabel__margin" name="LegendLabel__margin" href="#LegendLabel__margin">#</a> *LegendLabel*.**margin**&lt;union(string|number)&gt; <table><tr><td><strong>Default</strong></td><td>'5px 0'</td></td></table>
<h3 id="legendshape-">&lt;LegendShape /&gt;</h3>
<a id="#LegendShape__fill" name="LegendShape__fill" href="#LegendShape__fill">#</a> *LegendShape*.**fill**&lt;any&gt;
<a id="#LegendShape__height" name="LegendShape__height" href="#LegendShape__height">#</a> *LegendShape*.**height**&lt;any&gt;
<a id="#LegendShape__label" name="LegendShape__label" href="#LegendShape__label">#</a> *LegendShape*.**label**&lt;any&gt;
<a id="#LegendShape__margin" name="LegendShape__margin" href="#LegendShape__margin">#</a> *LegendShape*.**margin**&lt;any&gt;
<a id="#LegendShape__shape" name="LegendShape__shape" href="#LegendShape__shape">#</a> *LegendShape*.**shape**&lt;any&gt; <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**&lt;any&gt;
<a id="#LegendShape__size" name="LegendShape__size" href="#LegendShape__size">#</a> *LegendShape*.**size**&lt;any&gt;
<a id="#LegendShape__width" name="LegendShape__width" href="#LegendShape__width">#</a> *LegendShape*.**width**&lt;any&gt;
<h3 id="linear-">&lt;Linear /&gt;</h3>
<a id="#Linear__domain" name="Linear__domain" href="#Linear__domain">#</a> *Linear*.**domain**&lt;array&gt;
<a id="#Linear__labelFormat" name="Linear__labelFormat" href="#Linear__labelFormat">#</a> *Linear*.**labelFormat**&lt;func&gt; <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**&lt;func&gt; <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**&lt;func&gt; `required`
<a id="#Linear__steps" name="Linear__steps" href="#Linear__steps">#</a> *Linear*.**steps**&lt;number&gt; <table><tr><td><strong>Default</strong></td><td>5</td></td></table>
<h3 id="ordinal-">&lt;Ordinal /&gt;</h3>
<a id="#Ordinal__domain" name="Ordinal__domain" href="#Ordinal__domain">#</a> *Ordinal*.**domain**&lt;array&gt;
<a id="#Ordinal__labelFormat" name="Ordinal__labelFormat" href="#Ordinal__labelFormat">#</a> *Ordinal*.**labelFormat**&lt;func&gt; <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**&lt;func&gt; <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**&lt;func&gt; `required`
<h3 id="quantile-">&lt;Quantile /&gt;</h3>
<a id="#Quantile__domain" name="Quantile__domain" href="#Quantile__domain">#</a> *Quantile*.**domain**&lt;array&gt;
<a id="#Quantile__labelDelimiter" name="Quantile__labelDelimiter" href="#Quantile__labelDelimiter">#</a> *Quantile*.**labelDelimiter**&lt;string&gt; <table><tr><td><strong>Default</strong></td><td>'-'</td></td></table>
<a id="#Quantile__labelFormat" name="Quantile__labelFormat" href="#Quantile__labelFormat">#</a> *Quantile*.**labelFormat**&lt;func&gt; <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**&lt;func&gt;
<a id="#Quantile__scale" name="Quantile__scale" href="#Quantile__scale">#</a> *Quantile*.**scale**&lt;func&gt; `required`
<h3 id="size-">&lt;Size /&gt;</h3>
<a id="#Size__domain" name="Size__domain" href="#Size__domain">#</a> *Size*.**domain**&lt;array&gt;
<a id="#Size__labelFormat" name="Size__labelFormat" href="#Size__labelFormat">#</a> *Size*.**labelFormat**&lt;func&gt; <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**&lt;func&gt; <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**&lt;func&gt; `required`
<a id="#Size__steps" name="Size__steps" href="#Size__steps">#</a> *Size*.**steps**&lt;number&gt; <table><tr><td><strong>Default</strong></td><td>5</td></td></table>
<h3 id="threshold-">&lt;Threshold /&gt;</h3>
<a id="#Threshold__domain" name="Threshold__domain" href="#Threshold__domain">#</a> *Threshold*.**domain**&lt;array&gt;
<a id="#Threshold__labelDelimiter" name="Threshold__labelDelimiter" href="#Threshold__labelDelimiter">#</a> *Threshold*.**labelDelimiter**&lt;string&gt; <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**&lt;func&gt; <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**&lt;string&gt; <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**&lt;func&gt;
<a id="#Threshold__labelUpper" name="Threshold__labelUpper" href="#Threshold__labelUpper">#</a> *Threshold*.**labelUpper**&lt;string&gt; <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**&lt;func&gt; `required`
<h3 id="circle-">&lt;Circle /&gt;</h3>
<a id="#Circle__fill" name="Circle__fill" href="#Circle__fill">#</a> *Circle*.**fill**&lt;any&gt;
<a id="#Circle__height" name="Circle__height" href="#Circle__height">#</a> *Circle*.**height**&lt;union(number|string)&gt;
<a id="#Circle__style" name="Circle__style" href="#Circle__style">#</a> *Circle*.**style**&lt;object&gt;
<a id="#Circle__width" name="Circle__width" href="#Circle__width">#</a> *Circle*.**width**&lt;union(number|string)&gt;
<h3 id="rect-">&lt;Rect /&gt;</h3>
<a id="#Rect__fill" name="Rect__fill" href="#Rect__fill">#</a> *Rect*.**fill**&lt;any&gt;
<a id="#Rect__height" name="Rect__height" href="#Rect__height">#</a> *Rect*.**height**&lt;union(number|string)&gt;
<a id="#Rect__style" name="Rect__style" href="#Rect__style">#</a> *Rect*.**style**&lt;object&gt;
<a id="#Rect__width" name="Rect__width" href="#Rect__width">#</a> *Rect*.**width**&lt;union(number|string)&gt;

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

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