Socket
Socket
Sign inDemoInstall

recharts

Package Overview
Dependencies
9
Maintainers
4
Versions
240
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.9.0 to 2.9.1

8

es6/cartesian/CartesianGrid.js

@@ -257,5 +257,5 @@ import _isFunction from "lodash/isFunction";

horizontalPoints = horizontalCoordinatesGenerator({
yAxis: _objectSpread(_objectSpread({}, yAxis), {}, {
yAxis: yAxis ? _objectSpread(_objectSpread({}, yAxis), {}, {
ticks: isHorizontalValues ? horizontalValues : yAxis.ticks
}),
}) : undefined,
width: chartWidth,

@@ -271,5 +271,5 @@ height: chartHeight,

verticalPoints = verticalCoordinatesGenerator({
xAxis: _objectSpread(_objectSpread({}, xAxis), {}, {
xAxis: xAxis ? _objectSpread(_objectSpread({}, xAxis), {}, {
ticks: isVerticalValues ? verticalValues : xAxis.ticks
}),
}) : undefined,
width: chartWidth,

@@ -276,0 +276,0 @@ height: chartHeight,

@@ -59,2 +59,5 @@ import _isEqual from "lodash/isEqual";

});
_defineProperty(_assertThisInitialized(_this), "generateSimpleStrokeDasharray", function (totalLength, length) {
return "".concat(length, "px ").concat(totalLength - length, "px");
});
_defineProperty(_assertThisInitialized(_this), "getStrokeDasharray", function (length, totalLength, lines) {

@@ -64,2 +67,7 @@ var lineLength = lines.reduce(function (pre, next) {

});
// if lineLength is 0 return the default when no strokeDasharray is provided
if (!lineLength) {
return _this.generateSimpleStrokeDasharray(totalLength, length);
}
var count = Math.floor(length / lineLength);

@@ -69,3 +77,3 @@ var remainLength = length % lineLength;

var remainLines = [];
for (var i = 0, sum = 0;; sum += lines[i], ++i) {
for (var i = 0, sum = 0; i < lines.length; sum += lines[i], ++i) {
if (sum + lines[i] > remainLength) {

@@ -294,3 +302,3 @@ remainLines = [].concat(_toConsumableArray(lines.slice(0, i)), [remainLength - sum]);

} else {
currentStrokeDasharray = "".concat(curLength, "px ").concat(totalLength - curLength, "px");
currentStrokeDasharray = _this2.generateSimpleStrokeDasharray(totalLength, curLength);
}

@@ -297,0 +305,0 @@ return _this2.renderCurveStatically(points, needClip, clipPathId, {

@@ -265,5 +265,5 @@ "use strict";

horizontalPoints = horizontalCoordinatesGenerator({
yAxis: _objectSpread(_objectSpread({}, yAxis), {}, {
yAxis: yAxis ? _objectSpread(_objectSpread({}, yAxis), {}, {
ticks: isHorizontalValues ? horizontalValues : yAxis.ticks
}),
}) : undefined,
width: chartWidth,

@@ -279,5 +279,5 @@ height: chartHeight,

verticalPoints = verticalCoordinatesGenerator({
xAxis: _objectSpread(_objectSpread({}, xAxis), {}, {
xAxis: xAxis ? _objectSpread(_objectSpread({}, xAxis), {}, {
ticks: isVerticalValues ? verticalValues : xAxis.ticks
}),
}) : undefined,
width: chartWidth,

@@ -284,0 +284,0 @@ height: chartHeight,

@@ -67,2 +67,5 @@ "use strict";

});
_defineProperty(_assertThisInitialized(_this), "generateSimpleStrokeDasharray", function (totalLength, length) {
return "".concat(length, "px ").concat(totalLength - length, "px");
});
_defineProperty(_assertThisInitialized(_this), "getStrokeDasharray", function (length, totalLength, lines) {

@@ -72,2 +75,7 @@ var lineLength = lines.reduce(function (pre, next) {

});
// if lineLength is 0 return the default when no strokeDasharray is provided
if (!lineLength) {
return _this.generateSimpleStrokeDasharray(totalLength, length);
}
var count = Math.floor(length / lineLength);

@@ -77,3 +85,3 @@ var remainLength = length % lineLength;

var remainLines = [];
for (var i = 0, sum = 0;; sum += lines[i], ++i) {
for (var i = 0, sum = 0; i < lines.length; sum += lines[i], ++i) {
if (sum + lines[i] > remainLength) {

@@ -302,3 +310,3 @@ remainLines = [].concat(_toConsumableArray(lines.slice(0, i)), [remainLength - sum]);

} else {
currentStrokeDasharray = "".concat(curLength, "px ").concat(totalLength - curLength, "px");
currentStrokeDasharray = _this2.generateSimpleStrokeDasharray(totalLength, curLength);
}

@@ -305,0 +313,0 @@ return _this2.renderCurveStatically(points, needClip, clipPathId, {

{
"name": "recharts",
"version": "2.9.0",
"version": "2.9.1",
"description": "React charts",

@@ -5,0 +5,0 @@ "main": "lib/index",

@@ -118,2 +118,3 @@ import React, { PureComponent, ReactElement } from 'react';

getTotalLength(): number;
generateSimpleStrokeDasharray: (totalLength: number, length: number) => string;
getStrokeDasharray: (length: number, totalLength: number, lines: number[]) => string;

@@ -120,0 +121,0 @@ id: string;

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

import { AnimationEvent, AriaAttributes, ClipboardEvent, Component, CompositionEvent, DragEvent, FocusEvent, FormEvent, FunctionComponent, KeyboardEvent, MouseEvent, PointerEvent, ReactElement, ReactNode, SVGProps, SyntheticEvent, TouchEvent, TransitionEvent, UIEvent, WheelEvent } from 'react';
import { AnimationEvent, AriaAttributes, ClipboardEvent, Component, CompositionEvent, DragEvent, FocusEvent, FormEvent, FunctionComponent, KeyboardEvent, MouseEvent, PointerEvent, ReactElement, ReactNode, SVGProps, SyntheticEvent, TouchEvent, TransitionEvent, UIEvent, WheelEvent, JSX } from 'react';
import { ScaleContinuousNumeric as D3ScaleContinuousNumeric } from 'victory-vendor/d3-scale';

@@ -540,3 +540,3 @@ export declare type StackOffsetType = 'sign' | 'expand' | 'none' | 'wiggle' | 'silhouette' | 'positive';

};
export declare type ActiveShape<PropsType = Record<string, any>, ElementType = SVGElement> = ReactElement<SVGProps<ElementType>> | ((props: PropsType) => ReactElement<SVGProps<ElementType>>) | SVGProps<ElementType> | boolean;
export declare type ActiveShape<PropsType = Record<string, any>, ElementType = SVGElement> = ReactElement<SVGProps<ElementType>> | ((props: PropsType) => ReactElement<SVGProps<ElementType>>) | ((props: any) => JSX.Element) | SVGProps<ElementType> | boolean;
export {};

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

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc