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

victory-legend

Package Overview
Dependencies
Maintainers
26
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

victory-legend - npm Package Compare versions

Comparing version 36.5.0 to 36.5.1

3

es/helper-methods.js

@@ -374,2 +374,3 @@ import _isNil from "lodash/isNil";

}, initialProps);
};
};
//# sourceMappingURL=helper-methods.js.map

@@ -13,3 +13,3 @@ import * as React from "react";

VictoryStyleInterface,
VictoryLabelStyleObject
VictoryLabelStyleObject,
} from "victory-core";

@@ -16,0 +16,0 @@

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

export { default as VictoryLegend } from "./victory-legend";
export { default as VictoryLegend } from "./victory-legend";
//# sourceMappingURL=index.js.map

@@ -210,2 +210,3 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

VictoryLegend.expectedComponents = ["borderComponent", "containerComponent", "dataComponent", "groupComponent", "labelComponent", "titleComponent"];
export default addEvents(VictoryLegend);
export default addEvents(VictoryLegend);
//# sourceMappingURL=victory-legend.js.map

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

exports.getBaseProps = getBaseProps;
exports.getBaseProps = getBaseProps;
//# sourceMappingURL=helper-methods.js.map

@@ -13,3 +13,3 @@ import * as React from "react";

VictoryStyleInterface,
VictoryLabelStyleObject
VictoryLabelStyleObject,
} from "victory-core";

@@ -16,0 +16,0 @@

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

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=index.js.map

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

exports.default = _default;
exports.default = _default;
//# sourceMappingURL=victory-legend.js.map
{
"name": "victory-legend",
"version": "36.5.0",
"version": "36.5.1",
"description": "Legend Component for Victory",

@@ -24,3 +24,3 @@ "keywords": [

"prop-types": "^15.8.1",
"victory-core": "^36.5.0"
"victory-core": "^36.5.1"
},

@@ -34,3 +34,3 @@ "peerDependencies": {

"sideEffects": false,
"gitHead": "7cecba921f751c3decc8215f7e866f51d11203c1"
"gitHead": "fbe60407533cd7a6da4f8155d2ef8e189583c5a2"
}

@@ -28,3 +28,3 @@ import { defaults, assign, groupBy, keys, sum, range, isNil } from "lodash";

border: defaults({}, style.border, styleObject.border),
title: defaults({}, style.title, styleObject.title)
title: defaults({}, style.title, styleObject.title),
};

@@ -77,3 +77,3 @@ };

column: getColumn(props, index),
row: getRow(props, index)
row: getRow(props, index),
};

@@ -123,3 +123,3 @@ });

height: textSize.height + 2 * padding || 0,
width: textSize.width + 2 * padding || 0
width: textSize.width + 2 * padding || 0,
};

@@ -138,3 +138,3 @@ };

return memo;
}, 0)
}, 0),
};

@@ -146,3 +146,3 @@ };

textAnchor: titleOrientation === "right" ? "end" : "start",
verticalAnchor: titleOrientation === "bottom" ? "end" : "start"
verticalAnchor: titleOrientation === "bottom" ? "end" : "start",
};

@@ -154,3 +154,3 @@ if (centerTitle) {

textAnchor: horizontal ? "middle" : standardAnchors.textAnchor,
verticalAnchor: horizontal ? standardAnchors.verticalAnchor : "middle"
verticalAnchor: horizontal ? standardAnchors.verticalAnchor : "middle",
};

@@ -185,3 +185,3 @@ } else {

x: centerTitle ? width / 2 : borderPadding[xOrientation] + (padding || 0),
y: centerTitle ? height / 2 : borderPadding[yOrientation] + (padding || 0)
y: centerTitle ? height / 2 : borderPadding[yOrientation] + (padding || 0),
};

@@ -204,3 +204,3 @@ const getPadding = () => {

style,
text: title
text: title,
};

@@ -236,3 +236,3 @@ };

? sum(columnWidths) + titleDimensions.width
: Math.max(sum(columnWidths), titleDimensions.width)
: Math.max(sum(columnWidths), titleDimensions.width),
};

@@ -258,3 +258,3 @@ };

x = 0,
y = 0
y = 0,
} = props;

@@ -270,7 +270,7 @@ const groupedData = groupData(props);

x: titleOrientation === "left" ? titleDimensions.width : 0,
y: titleOrientation === "top" ? titleDimensions.height : 0
y: titleOrientation === "top" ? titleDimensions.height : 0,
};
const gutterOffset = {
x: gutter && typeof gutter === "object" ? gutter.left || 0 : 0,
y: rowGutter && typeof rowGutter === "object" ? rowGutter.top || 0 : 0
y: rowGutter && typeof rowGutter === "object" ? rowGutter.top || 0 : 0,
};

@@ -289,5 +289,5 @@ const { height, width } = getDimensions(props, fallbackProps);

width: props.width,
style: style.parent
style: style.parent,
},
all: { border: borderProps, title: titleProps }
all: { border: borderProps, title: titleProps },
};

@@ -309,3 +309,3 @@ return groupedData.reduce((childProps, datum, i) => {

y: originY + offset.y + titleOffset.y + gutterOffset.y,
x: originX + offset.x + titleOffset.x + gutterOffset.x
x: originX + offset.x + titleOffset.x + gutterOffset.x,
};

@@ -319,3 +319,3 @@

y: dataProps.y,
x: dataProps.x + datum.symbolSpacer + datum.size / 2
x: dataProps.x + datum.symbolSpacer + datum.size / 2,
};

@@ -322,0 +322,0 @@ childProps[eventKey] = { data: dataProps, labels: labelProps };

@@ -13,3 +13,3 @@ import * as React from "react";

VictoryStyleInterface,
VictoryLabelStyleObject
VictoryLabelStyleObject,
} from "victory-core";

@@ -16,0 +16,0 @@

@@ -12,3 +12,3 @@ import React from "react";

Point,
Border
Border,
} from "victory-core";

@@ -22,3 +22,3 @@

x: 0,
y: 0
y: 0,
};

@@ -41,4 +41,4 @@

left: PropTypes.number,
right: PropTypes.number
})
right: PropTypes.number,
}),
]),

@@ -56,4 +56,4 @@ centerTitle: PropTypes.bool,

"green",
"blue"
])
"blue",
]),
]),

@@ -65,4 +65,4 @@ containerComponent: PropTypes.element,

label: PropTypes.object,
symbol: PropTypes.object
})
symbol: PropTypes.object,
}),
),

@@ -74,5 +74,5 @@ dataComponent: PropTypes.element,

CustomPropTypes.integer,
CustomPropTypes.nonNegative
CustomPropTypes.nonNegative,
]),
PropTypes.string
PropTypes.string,
]),

@@ -86,8 +86,8 @@ events: PropTypes.arrayOf(

CustomPropTypes.integer,
CustomPropTypes.nonNegative
CustomPropTypes.nonNegative,
]),
PropTypes.string
PropTypes.string,
]),
eventHandlers: PropTypes.object
})
eventHandlers: PropTypes.object,
}),
),

@@ -102,9 +102,9 @@ externalEventMutations: PropTypes.arrayOf(

CustomPropTypes.integer,
CustomPropTypes.nonNegative
CustomPropTypes.nonNegative,
]),
PropTypes.string
PropTypes.string,
]),
mutation: PropTypes.func,
target: PropTypes.oneOfType([PropTypes.string, PropTypes.array])
})
target: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
}),
),

@@ -116,4 +116,4 @@ groupComponent: PropTypes.element,

left: PropTypes.number,
right: PropTypes.number
})
right: PropTypes.number,
}),
]),

@@ -131,4 +131,4 @@ height: CustomPropTypes.nonNegative,

left: PropTypes.number,
right: PropTypes.number
})
right: PropTypes.number,
}),
]),

@@ -139,8 +139,8 @@ rowGutter: PropTypes.oneOfType([

top: PropTypes.number,
bottom: PropTypes.number
})
bottom: PropTypes.number,
}),
]),
sharedEvents: PropTypes.shape({
events: PropTypes.array,
getEventState: PropTypes.func
getEventState: PropTypes.func,
}),

@@ -153,3 +153,3 @@ standalone: PropTypes.bool,

parent: PropTypes.object,
title: PropTypes.object
title: PropTypes.object,
}),

@@ -163,3 +163,3 @@ symbolSpacer: PropTypes.number,

x: CustomPropTypes.nonNegative,
y: CustomPropTypes.nonNegative
y: CustomPropTypes.nonNegative,
};

@@ -176,3 +176,3 @@

theme: VictoryTheme.grayscale,
titleComponent: <VictoryLabel />
titleComponent: <VictoryLabel />,
};

@@ -188,3 +188,3 @@

"labelComponent",
"titleComponent"
"titleComponent",
];

@@ -212,3 +212,3 @@

"labels",
index
index,
);

@@ -224,7 +224,7 @@ if (labelProps.text !== undefined && labelProps.text !== null) {

"border",
"all"
"all",
);
const borderComponent = React.cloneElement(
props.borderComponent,
borderProps
borderProps,
);

@@ -235,3 +235,3 @@ if (title) {

props.titleComponent,
titleProps
titleProps,
);

@@ -242,3 +242,3 @@ return [

titleComponent,
...labelComponents
...labelComponents,
];

@@ -245,0 +245,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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