{"name":"d3tooltip","version":"1.3.0","keywords":["d3","tooltip"],"author":{"name":"romseguy"},"license":"MIT","_id":"d3tooltip@1.3.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":"4fe86d768353631a49f9b48f43d4850d1b1812f4","tarball":"http://registry-npm.ywwl.com/d3tooltip/download/d3tooltip-1.3.0.tgz","fileCount":18,"integrity":"sha512-uOEEPgraCiWw3kZL6P5AAduLOp/FOcXHnjT+D4Az1O/1Cf7aLU0VlLeKGBGtEAcqO0Dv1qQgBKfuVhY1LODkLw==","signatures":[{"sig":"MEUCIQCOU5Bp3wyLPD2C2IPY6JQ+B/m9Ht40+0/kCQeRQB29wQIgBAp+FKs0OHu5IpMNTGjHaSOElY/N1YEKoVzrdEvIsVk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":836103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQ5IRCRA9TVsSAnZWagAAciEP/0EysrSO4PdFtEOoIR7L\nX90TKEssdNXBrGiDgVImPBAuodghaeaRrJBPM3ynqs/EQoei7CLZZ5+9ru9m\nvFWmaRL+qbwfBIhK+ESxNVvdQSIKstba2KEsaY7Fj85gVPNoZDPfru4qWnWB\n09Pq9Zw2PkiF8Cq09SK56PuYaml7EvAbBearTi8drlMGc/AehShn2nM97v3/\niQGhtnYnkn8XgaOnO9SVgqW2RMUsGHBbJfdrtQtpLudyrdOMz7HRksmF29xI\n8gPgWWgWRQgpcJpDN97isfxMYVMaipFTkvRqbkjh/TFiAFlxL31tkb+i4Ip7\nkfHfpnWdcU+Z8kurzmf81I3CGiXXGP1gvh2KQhi9KLiGvgRTtXLdzsASciBP\nNByPke96LXEYXGTjlW2hqSNucdpHJg9TBwTc/fl5TTOnwlvEo2nasc1z3hNE\nAZshW3M8H4ebed9RbVRnBXjaLPMMWwo3pZRFjrMvimVHT/WO3u5Ti//lwy59\ns50nSMEwVFlmaNZEzYaaKOGc6C4gxpctJMvZW/uBDzF30lVbZjWPC6Mjo27m\nvbMErDnSpoPE6Jqci6UzSBij9l+MLfyPlN29QLWki2Mx6n1cQ4zzUNv+aw26\nuZtX1yi9YLY/UGMg25wxgl2CbPgYK6nA+it8QcN2uzafcdBU2NZxA/0q42Hu\n1Tjp\r\n=QtFo\r\n-----END PGP SIGNATURE-----\r\n","size":114593,"noattachment":false,"key":"/d3tooltip/-/d3tooltip-1.3.0.tgz"},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"5ef9b00cd4717ac878068ce8003e1999e680c72e","scripts":{"lint":"eslint . --ext .ts","build":"npm run build:types && npm run build:js && npm run build:umd && npm run build:umd:min","clean":"rimraf lib dist","build:js":"babel src --out-dir lib --extensions \".ts\" --source-maps inline","lint:fix":"eslint . --ext .ts --fix","build:umd":"webpack --progress --config webpack.config.umd.ts","preversion":"npm run type-check && npm run lint","type-check":"tsc --noEmit","build:types":"tsc --emitDeclarationOnly","build:umd:min":"webpack --env.production --progress --config webpack.config.umd.ts","prepublishOnly":"npm run clean && npm run build","type-check:watch":"npm run type-check -- --watch"},"_npmUser":{"name":"methuselah96","email":"nbierema@gmail.com"},"repository":{"url":"git+https://github.com/reduxjs/redux-devtools.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (win32)","description":"A highly configurable tooltip for d3","directories":{},"_nodeVersion":"14.15.0","dependencies":{"ramda":"^0.27.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/ramda":"^0.27.17"},"peerDependencies":{"d3":"^3.5.17","@types/d3":"^3.5.43"},"_npmOperationalInternal":{"tmp":"tmp/d3tooltip_1.3.0_1615041041442_0.8937141418072483","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":1615041041571,"_cnpm_publish_time":1615041041571,"dist-tags":{"latest":"4.0.1"}}