{"name":"d3tooltip","version":"2.0.0","keywords":["d3","tooltip"],"author":{"name":"romseguy"},"license":"MIT","_id":"d3tooltip@2.0.0","maintainers":[{"name":"timdorr","email":"timdorr@timdorr.com"},{"name":"romseguy","email":"rom.seguy@gmail.com"},{"name":"zalmoxisus","email":"zalmoxisus@gmail.com"},{"name":"methuselah96","email":"nbierema@gmail.com"}],"homepage":"https://github.com/reduxjs/redux-devtools/tree/master/packages/d3tooltip","bugs":{"url":"https://github.com/reduxjs/redux-devtools/issues"},"dist":{"shasum":"d9f21724b3a782bf0b7faec14b847cabd59a966c","tarball":"http://registry-npm.ywwl.com/d3tooltip/download/d3tooltip-2.0.0.tgz","fileCount":15,"integrity":"sha512-QAjdZbwRWrwz2uc3fiQzeleINbN8i0rPr5YfOdmtHeYQtaBv2c7TUR+KM74zuXZQKyHXyvdkx16sJAeL5aF8sQ==","signatures":[{"sig":"MEUCIQDwV6Qy/dbI1CieKGxs+3VrdrX8JRB6/WBlbcHqB4jCyAIgQ9MnGS88YJufN85ZjsWa7YqjLPpE4AuniTqRH5qAZgY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":77638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3ImJCRA9TVsSAnZWagAAHcIP/A/fR3XoUcE5e1c+5NEr\n2oCGKg1XD3AWX+F5/ELTlYj1YwdsypWEoZgIDbw7dLlZt33HTgbINtjYReds\nfzbDgf16gX+B6toP44RKqClpUaaLtXbiH/5nY270oB0ZUslzRhkahH+YCVKW\n4UC2tPOUgFqlz+MrdrAZuDPmAdpXddNQGMYFM9TfSjB7+aeeXZ/pPIEQpaTD\nSq3ZEI+ydNsMTi+9KX7fR4a4q+hKhUUChgFAWs7ksZbOIYtbFXzFiPghgaDW\n9xxKBy7CusHKAQMSOlkxMhLEPFeUNmh0x6cOuuNHT0t4WO+Bv0GsUmLbHL14\nvyfUQldp8Y/HmqxuJX46fRiYcRuVnl03zdN769qsk9KmWts1gKb+suvkSM9H\n+2rS+dXqMlphp/E8JlheLEUgLQNw/NrylOwz+LU+ni2gzSd7By6IkRoeAa1m\nRrKKzuhEOWcPyyTI6fJkJc7l25eRgDZHkT2IgPBODcNfpfPxlJDqNhfPXKuG\nIZdOA5upTPKM1BN3/bxoVK4gY9TRiuUJYWx4Dn6PTbsgfreQuNOBt3GRvIFk\nw/Yks6HQre8MdUkmSr1t9BL48rBHOvAheqFWiO8p8J2QPnrtENTANr/3Lofe\nduxhfp7J8NtoBgJI8NvIbsX/LeDsWSyVUgiOM4aaRXpyLzSnvjL2h4b0XtJ1\nvmqr\r\n=if9m\r\n-----END PGP SIGNATURE-----\r\n","size":20522,"noattachment":false,"key":"/d3tooltip/-/d3tooltip-2.0.0.tgz"},"main":"dist/d3tooltip.cjs.js","types":"dist/index.d.ts","unpkg":"dist/d3tooltip.umd.js","module":"dist/d3tooltip.esm.js","gitHead":"24e5e78e6943d69d352827345b1824a971b74f14","scripts":{"lint":"eslint . --ext .ts","build":"rollup -c","clean":"rimraf dist","prepack":"yarn run clean && yarn run build","prepublish":"yarn run type-check && yarn run lint","type-check":"tsc --noEmit"},"_npmUser":{"name":"methuselah96","email":"nbierema@gmail.com"},"repository":{"url":"git+https://github.com/reduxjs/redux-devtools.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (win32)","description":"A highly configurable tooltip for d3","directories":{},"_nodeVersion":"16.13.0","dependencies":{"ramda":"^0.27.1","@babel/runtime":"^7.16.7"},"_hasShrinkwrap":false,"devDependencies":{"d3":"^3.5.17","tslib":"^2.3.1","eslint":"^8.6.0","rimraf":"^3.0.2","rollup":"^2.63.0","@types/d3":"^3.5.46","typescript":"~4.5.4","@babel/core":"^7.16.7","@types/ramda":"^0.27.62","@babel/preset-env":"^7.16.7","@babel/eslint-parser":"^7.16.5","@rollup/plugin-babel":"^5.3.0","rollup-plugin-terser":"^7.0.2","eslint-config-prettier":"^8.3.0","@rollup/plugin-commonjs":"^21.0.1","@babel/preset-typescript":"^7.16.7","@typescript-eslint/parser":"^5.8.1","rollup-plugin-typescript2":"^0.31.1","@rollup/plugin-node-resolve":"^13.1.3","@babel/plugin-transform-runtime":"^7.16.7","@typescript-eslint/eslint-plugin":"^5.8.1"},"peerDependencies":{"d3":"^3.5.17","@types/d3":"^3.5.46"},"_npmOperationalInternal":{"tmp":"tmp/d3tooltip_2.0.0_1641843080871_0.5166644864368035","host":"s3://npm-registry-packages"},"readme":"# d3tooltip\n\nThis tooltip aims for a minimal yet highly configurable API. It has a long way to go, but the essentials are there.\nIt was created by [@romseguy](https://github.com/romseguy) and merged from [`romseguy/d3tooltip`](https://github.com/romseguy/d3tooltip).\n\n## Installation\n\n`npm install d3-state-visualizer`\n\n## Quick usage\n\n```javascript\nimport * as d3 from 'd3';\nimport { tooltip } from 'd3tooltip';\n\nconst DOMNode = document.getElementById('chart');\nconst root = d3.select(DOMNode);\nconst vis = root.append('svg');\n\nconst options = {\n  offset: { left: 30, top: 10 },\n  styles: { 'min-width': '50px', 'border-radius': '5px' },\n};\n\nvis\n  .selectAll('circle')\n  .data(someData)\n  .enter()\n  .append('circle')\n  .attr('r', 10)\n  .call(\n    d3tooltip('tooltipClassName', {\n      ...options,\n      text: (d) => toStringOrHtml(d),\n    }),\n  )\n  .on('mouseover', function () {\n    d3.select(this).style('fill', 'skyblue');\n  })\n  .on('mouseout', function () {\n    d3.select(this).style('fill', 'black');\n  });\n```\n\n## API\n\n| Option   | Type               | Default             | Description                                                                                                                                                      |\n| -------- | ------------------ | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `root`   | DOM.Element        | `body`              | The tooltip will be added as a child of that element. You can also use a D3 [selection](https://github.com/mbostock/d3/wiki/Selections#d3_select).               |\n| `left`   | Number             | `undefined`         | Sets the tooltip `x` absolute position instead of the mouse `x` position, relative to the `root` element.                                                        |\n| `top`    | Number             | `undefined`         | Sets the tooltip `y` absolute position instead of the mouse `y` position, relative to the `root` element.                                                        |\n| `offset` | Object             | `{left: 0, top: 0}` | Sets the distance, starting from the cursor position, until the tooltip is rendered. **Warning**: only applicable if you don't provide a `left` or `top` option. |\n| `styles` | Object             | `{}`                | Sets the styles of the tooltip element.                                                                                                                          |\n| `text`   | String or Function | `''`                | Sets the text of the tooltip. Can be a constant `string` or a function that takes the datum and returns a `string`.                                              |\n","publish_time":1641843081002,"_cnpm_publish_time":1641843081002,"dist-tags":{"latest":"4.0.1"}}