{"name":"d3tooltip","version":"3.0.0","keywords":["d3","tooltip"],"author":{"name":"romseguy"},"license":"MIT","_id":"d3tooltip@3.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":"d925e5567673fb1a0fb970392398b34c42962197","tarball":"http://registry-npm.ywwl.com/d3tooltip/download/d3tooltip-3.0.0.tgz","fileCount":7,"integrity":"sha512-bQSxCU0D99KEvpHZjB5oiXToc98FxIHOAAOJRncZMsU3iUU18a2X//FgPnuI0K7wVjfKfgr4dXw5sEvTXSyu6Q==","signatures":[{"sig":"MEUCIQD9u1pF1A1IrTLVCy1s/inEQKIxjWpIiu0U3Yv8Qmm5oAIgL1BTtu1TLCwg6RjUikuekgv7sQBwaf8QiiKXgZIN3wE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13673,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtt8hACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoLBQ//elElY+6+jCF5X7mSNB69NdU5qpEOTodeSUY2kS3FCwRtk4im\r\nV2J60FkxnOCGx01VS6gWU08rUvhdjoGGvcjLfz0fDzytdg4Iaaz4EYTs3gRi\r\nUAApdTKP6a8Y1t+g530r05ziMrJyVwfwsZjucKd6hxXPR3+xYYv5sImvDwW4\r\n+REwqfxO+ch8RTrhyOSEnReWjCvBqZ6qVpTNevLtkqAAd5qbQoFg0ed/BYGZ\r\nvVOFXdr+dlvSV9GNbWsVhHBqWz/yI1TDXN+06XN4VBQb8AVrjbKblDiCYAEZ\r\nQD+aAG510inPfsIm266H32JjDsUcHmgQfgAzO75+/Pf2LO5tXm3nt1Ps3DZ2\r\nxcymE/s4f+4IBymLDeDLp+At2GRrPkINZLEa/QJXpJ43hy3L2MSRhZuvxnZk\r\nu8/PYDK3jVYkxW8wlOI5G1eqZ9B1bk2Np0RlxaAVMeqNxmM6m+eOXAlia9uu\r\nqM+MWqCJihqy2O7oOjoC+D8nLYoqvN5L5aN4QMH+kdUSxW+J5WQXBS3Sevwc\r\nFxcrCVrCddmwuiP4WXD3+yAVJGIdyDwJqF+QPPucFowYTzRKWKypCA8myZKZ\r\nS+WItvTHgy5QsVgcCYLIP7712Yw7fpZ06/i6DQSwRol4LzlrX+frZxLRllh/\r\ne153nu2pWwEQRCMxgNsDLtoU7yQco4Z0tVs=\r\n=ScI4\r\n-----END PGP SIGNATURE-----\r\n","size":4086,"noattachment":false,"key":"/d3tooltip/-/d3tooltip-3.0.0.tgz"},"main":"lib/cjs/index.js","_from":"file:d3tooltip-3.0.0.tgz","types":"lib/types/index.d.ts","module":"lib/esm/index.js","scripts":{"lint":"eslint . --ext .ts","build":"pnpm run build:cjs && pnpm run build:esm && pnpm run build:types","clean":"rimraf lib","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","prepublish":"pnpm run type-check && pnpm run lint","type-check":"tsc --noEmit","build:types":"tsc --emitDeclarationOnly"},"_npmUser":{"name":"methuselah96","email":"nbierema@gmail.com"},"_resolved":"/tmp/399c01d8d864e593e4e4a2491877dc11/d3tooltip-3.0.0.tgz","_integrity":"sha512-bQSxCU0D99KEvpHZjB5oiXToc98FxIHOAAOJRncZMsU3iUU18a2X//FgPnuI0K7wVjfKfgr4dXw5sEvTXSyu6Q==","repository":{"url":"git+https://github.com/reduxjs/redux-devtools.git","type":"git"},"_npmVersion":"8.19.2","description":"A highly configurable tooltip for d3","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@babel/runtime":"^7.20.6"},"_hasShrinkwrap":false,"devDependencies":{"d3":"^7.8.0","eslint":"^8.30.0","rimraf":"^3.0.2","@types/d3":"^7.4.0","@babel/cli":"^7.19.3","typescript":"~4.9.4","@babel/core":"^7.20.5","@babel/preset-env":"^7.20.2","@babel/eslint-parser":"^7.19.1","eslint-config-prettier":"^8.5.0","@babel/preset-typescript":"^7.18.6","@typescript-eslint/parser":"^5.47.0","@typescript-eslint/eslint-plugin":"^5.47.0"},"peerDependencies":{"d3":"^7.8.0","@types/d3":"^7.4.0"},"_npmOperationalInternal":{"tmp":"tmp/d3tooltip_3.0.0_1672929057706_0.36042969819969484","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":1672929057870,"_cnpm_publish_time":1672929057870,"dist-tags":{"latest":"4.0.1"}}