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

react-animated-dataset

Package Overview
Dependencies
Maintainers
5
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-animated-dataset - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

13

build/AnimatedDataset.js
import React from 'react';
import { select } from 'd3-selection';
import 'd3-transition';
import { easeCubic } from 'd3-ease';

@@ -98,3 +99,5 @@ function _slicedToArray(arr, i) {

_ref$disableAnimation = _ref.disableAnimation,
disableAnimation = _ref$disableAnimation === void 0 ? false : _ref$disableAnimation;
disableAnimation = _ref$disableAnimation === void 0 ? false : _ref$disableAnimation,
_ref$easing = _ref.easing,
easing = _ref$easing === void 0 ? easeCubic : _ref$easing;
var ref = /*#__PURE__*/React.createRef();

@@ -124,3 +127,3 @@ var refOldAttrs = React.useRef();

}).call(function (sel) {
var tran = disableAnimation ? sel : sel.transition().delay(delay).duration(duration);
var tran = disableAnimation ? sel : sel.transition().ease(easing).delay(delay).duration(duration);
attrsList.forEach(function (a) {

@@ -132,3 +135,3 @@ tran.attr(a, attrs[a]);

return update.text(attrs.text).call(function (sel) {
var tran = disableAnimation ? sel : sel.transition().delay(delay).duration(duration);
var tran = disableAnimation ? sel : sel.transition().ease(easing).delay(delay).duration(duration);
attrsList.forEach(function (a) {

@@ -140,3 +143,3 @@ tran.attr(a, attrs[a]);

return exit.call(function (sel) {
var tran = disableAnimation ? sel : sel.transition().delay(delay).duration(duration);
var tran = disableAnimation ? sel : sel.transition().ease(easing).delay(delay).duration(duration);
attrsList.forEach(function (a) {

@@ -155,3 +158,3 @@ tran.attr(a, init.hasOwnProperty(a) ? init[a] : attrs[a]).remove();

}
}, [dataset, unparsedInit, keyFn, ref, tag, unparsedAttrs, duration, disableAnimation, unparsedEvents, delay]);
}, [dataset, unparsedInit, keyFn, ref, tag, unparsedAttrs, duration, disableAnimation, unparsedEvents, delay, easing]);
return /*#__PURE__*/React.createElement('g', {

@@ -158,0 +161,0 @@ ref: ref

{
"name": "react-animated-dataset",
"version": "0.1.0",
"version": "0.2.0",
"description": "React component for data animation",

@@ -5,0 +5,0 @@ "main": "build/AnimatedDataset.js",

@@ -226,9 +226,15 @@ # AnimatedDataset

It also accepts events listener. They can be in kebab-case (`on-mouseover`) or camel case (`onMouseOver`).
<h3 id="events">
<a href="#events">#</a> events
</h3>
- Type: `{ [key: string]: (mouseEvent: MouseEvent, datum: any) => void }`
Event listeners keys can be written in kebab-case (`on-mouseover`) or camel case (`onMouseOver`).
```jsx
<AnimatedDataset
attrs = {{
'on-click': datum => console.log(datum),
onMouseOver: (datum, index, nodes) => ...
events={{
'on-click': (mouseEvent, datum) => console.log(datum),
onMouseOver: (mouseEvent, datum) => ...
}}

@@ -235,0 +241,0 @@ />

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