{"name":"d3tooltip","version":"2.1.0","keywords":["d3","tooltip"],"author":{"name":"romseguy"},"license":"MIT","_id":"d3tooltip@2.1.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":"bd6be6d04613220065ecbc74682020e128dac5a3","tarball":"http://registry-npm.ywwl.com/d3tooltip/download/d3tooltip-2.1.0.tgz","fileCount":21,"integrity":"sha512-McomFzJ39RVyGTCKolazdmNG25AdykpdSbaEwyzFHEi4GZH7eZv8FxKwCpsN5/BaywvdsUtRa7eXCScISrJv9A==","signatures":[{"sig":"MEUCIBnF+tWdHAsXgYzQl/7cZjhq2IIVDXybKyYKUQ3g8XVPAiEAkLcleUycy7d4tIbvV8DrIU8+TPk6bqZMrerxmUoCTl0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":78711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7073CRA9TVsSAnZWagAATFAP/iAAnM1CPI2stHonpXkK\n/RHzU7to77PibUJN2waVg1YuuaNqU6ea+aSr1KL3nca++V+N5sBLuz3dwWum\n0nrLeBseAxef4JcJprms5LUeQC9TWqMSgZfssF16EH+paRfFukg9ANpQgwJe\nZlrbgraDxjAlFHZglwfOf/BQHH8ejdESwhrFr3WMClyD9O3hqu+J1H4+nl9K\nGRMpFIg0gGbj/yzl/jaNoIAzpQgJjTxrAtc2EoLy9sBp9yQmSTvSN62EH20x\nPhETPGFP0cC6+w4GJ1R42Zmllzum4WRTGk8bLi2x+clXE+K2hEsSq3Ns67vI\nB734JALi9+u9JXK3DpD7mokfi9Pbp1b5zelUlar0pFB81Z7jDI03MJ71cXM1\nbQsi+Srz/RXWLoHgYe/274HMT0rFyD1eDZ5GlWl4eqvX7EoUWg+9zAOURaoP\nLu9YNn0HEPZ17unjTVAuaK4AjOefTjx8ctobmFooC9oComHRDqpPbPZkM0BG\n1e4WfkGzfU3lYPEApRSTNB7BzVkpz0A6+NWIXWraDspLexsJRoNU52QM8LjE\nL/gt+X4zvgaqWIgYTMPXCZGXz6xwNADPnn6t1Q605PQcVc517RH5DQd5u67O\nzrByRo8CgAXk2BCOO62lodZiFGM+VUZv+Pnj+gombzWhtbqMWv4RO5KwNHr/\nPCKz\r\n=jp96\r\n-----END PGP SIGNATURE-----\r\n","size":20119,"noattachment":false,"key":"/d3tooltip/-/d3tooltip-2.1.0.tgz"},"main":"lib/cjs/index.js","types":"lib/types/index.d.ts","unpkg":"lib/umd/d3tooltip.umd.js","module":"lib/esm/index.js","gitHead":"238b8896f9cdb8c15c265025d131830a7f3570b9","scripts":{"lint":"eslint . --ext .ts","build":"yarn build:cjs && yarn build:esm && yarn build:types && yarn build:umd","clean":"rimraf lib","prepack":"yarn run clean && yarn run build","build:cjs":"babel src --extensions \".ts\" --out-dir lib/cjs","build:esm":"babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm","build:umd":"rollup -c","prepublish":"yarn run type-check && yarn run lint","type-check":"tsc --noEmit","build:types":"tsc --emitDeclarationOnly"},"_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":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"ramda":"^0.28.0","@babel/runtime":"^7.16.7"},"_hasShrinkwrap":false,"devDependencies":{"d3":"^3.5.17","tslib":"^2.3.1","eslint":"^8.7.0","rimraf":"^3.0.2","rollup":"^2.66.0","@types/d3":"^3.5.46","@babel/cli":"^7.16.8","typescript":"~4.5.5","@babel/core":"^7.16.12","@types/ramda":"^0.27.64","@babel/preset-env":"^7.16.11","@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.10.0","rollup-plugin-typescript2":"^0.31.1","@rollup/plugin-node-resolve":"^13.1.3","@babel/plugin-transform-runtime":"^7.16.10","@typescript-eslint/eslint-plugin":"^5.10.0"},"peerDependencies":{"d3":"^3.5.17","@types/d3":"^3.5.46"},"_npmOperationalInternal":{"tmp":"tmp/d3tooltip_2.1.0_1643073271429_0.19013766249953945","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":1643073271668,"_cnpm_publish_time":1643073271668,"dist-tags":{"latest":"4.0.1"}}