{"_id":"@brunobuddy/d3-v6-tip","_rev":"5-c40b57aa6b88a7408aad582111638c95","name":"@brunobuddy/d3-v6-tip","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"@brunobuddy/d3-v6-tip","version":"0.0.1","description":"d3-v6-tip Module","keywords":["d3","d3-module"],"license":"BSD-3-Clause","main":"build/d3-v6-tip.js","jsnext:main":"index","homepage":"https://github.com/bumbeishvili/d3.tip-for-d3.v6","repository":{"type":"git","url":"git+https://github.com/bumbeishvili/d3.tip-for-d3.v6.git"},"scripts":{"pretest":"rm -rf build && mkdir build && rollup -g d3-selection:d3 -f umd -n d3 -o build/d3-v6-tip.js -- index.js","test":"tape 'test/**/*-test.js'","prepublish":"npm run test && uglifyjs build/d3-v6-tip.js -c -m -o build/d3-v6-tip.min.js","postpublish":"zip -j build/d3-v6-tip.zip -- LICENSE README.md build/d3-v6-tip.js build/d3-v6-tip.min.js"},"devDependencies":{"rollup":"0.27","tape":"4","uglify-es":"3"},"dependencies":{"d3-selection":"2"},"gitHead":"a049e2c705c41f884b5736749a7688f6f6334e4e","bugs":{"url":"https://github.com/bumbeishvili/d3.tip-for-d3.v6/issues"},"_id":"@brunobuddy/d3-v6-tip@0.0.1","_nodeVersion":"14.15.4","_npmVersion":"7.5.6","dist":{"integrity":"sha512-F134fxHarAJ7m2t7hlRlgmdl+pITIgzrUY62RsujW1MaeA/p1Ih2hyLqPYv3BrKyly4PeZSTnf7FfyqRyDyWiA==","shasum":"b88f25e8b86918171cbd5425e339375122f29245","tarball":"https://registry.npmjs.org/@brunobuddy/d3-v6-tip/-/d3-v6-tip-0.0.1.tgz","fileCount":9,"unpackedSize":33250,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEVNRIh9fNCOSG59ne8xBWpfn8h21Te5E3zbQAis8hCTAiEAwl1qa+g8BIT44gUePjSXXGIEleoT26J6iYK3JO2OXt8="}]},"_npmUser":{"name":"brunobuddy","email":"bruno@buddyweb.fr"},"directories":{},"maintainers":[{"name":"brunobuddy","email":"bruno@buddyweb.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/d3-v6-tip_0.0.1_1634711537315_0.2688482578579203"},"_hasShrinkwrap":false},"0.0.2":{"name":"@brunobuddy/d3-v6-tip","version":"0.0.2","description":"d3-v6-tip Module","keywords":["d3","d3-module"],"license":"BSD-3-Clause","main":"build/d3-v6-tip.js","jsnext:main":"index","homepage":"https://github.com/bumbeishvili/d3.tip-for-d3.v6","repository":{"type":"git","url":"git+https://github.com/bumbeishvili/d3.tip-for-d3.v6.git"},"scripts":{"pretest":"rm -rf build && mkdir build && rollup -g d3-selection:d3 -f umd -n d3 -o build/d3-v6-tip.js -- index.js","test":"tape 'test/**/*-test.js'","prepublish":"npm run test && uglifyjs build/d3-v6-tip.js -c -m -o build/d3-v6-tip.min.js","postpublish":"zip -j build/d3-v6-tip.zip -- LICENSE README.md build/d3-v6-tip.js build/d3-v6-tip.min.js"},"devDependencies":{"rollup":"0.27","tape":"4","uglify-es":"3"},"dependencies":{"d3-selection":"2"},"gitHead":"a049e2c705c41f884b5736749a7688f6f6334e4e","bugs":{"url":"https://github.com/bumbeishvili/d3.tip-for-d3.v6/issues"},"_id":"@brunobuddy/d3-v6-tip@0.0.2","_nodeVersion":"14.15.4","_npmVersion":"7.5.6","dist":{"integrity":"sha512-az9aiDq1sOe5d1uxFf+2HD1ePnwTiPM0lns6/AmfmTXWpx9ADCqevQzwXjvtiNTUsS41xj7wJrVbdIYURTltFg==","shasum":"b0824e7bd05c367d864432e5b4a3b0b2251ab9c6","tarball":"https://registry.npmjs.org/@brunobuddy/d3-v6-tip/-/d3-v6-tip-0.0.2.tgz","fileCount":9,"unpackedSize":33772,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDO1X1bKFv5ox5PP8/ibqCAIQqnFJ5Iec1SfeYBmgHGQIhAOd7VjVsaTYY6yw8qAFzAY0Se0LACZzjS19Cla5fQIPM"}]},"_npmUser":{"name":"brunobuddy","email":"bruno@buddyweb.fr"},"directories":{},"maintainers":[{"name":"brunobuddy","email":"bruno@buddyweb.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/d3-v6-tip_0.0.2_1634711933149_0.0385362770242168"},"_hasShrinkwrap":false},"0.0.3":{"name":"@brunobuddy/d3-v6-tip","version":"0.0.3","description":"d3-v6-tip Module","keywords":["d3","d3-module"],"license":"BSD-3-Clause","main":"build/d3-v6-tip.js","jsnext:main":"index","homepage":"https://github.com/bumbeishvili/d3.tip-for-d3.v6","repository":{"type":"git","url":"git+https://github.com/bumbeishvili/d3.tip-for-d3.v6.git"},"scripts":{"pretest":"rm -rf build && mkdir build && rollup -g d3-selection:d3 -f umd -n d3 -o build/d3-v6-tip.js -- index.js","test":"tape 'test/**/*-test.js'","prepublish":"npm run test && uglifyjs build/d3-v6-tip.js -c -m -o build/d3-v6-tip.min.js","postpublish":"zip -j build/d3-v6-tip.zip -- LICENSE README.md build/d3-v6-tip.js build/d3-v6-tip.min.js"},"devDependencies":{"rollup":"0.27","tape":"4","uglify-es":"3"},"dependencies":{"d3-selection":"2"},"gitHead":"a049e2c705c41f884b5736749a7688f6f6334e4e","bugs":{"url":"https://github.com/bumbeishvili/d3.tip-for-d3.v6/issues"},"_id":"@brunobuddy/d3-v6-tip@0.0.3","_nodeVersion":"14.15.4","_npmVersion":"7.5.6","dist":{"integrity":"sha512-GQbDmNSXd7WvhDv86xayhh5U0ATjB/Y+0EEHEE0uO/8FEJDyydgBmTsldTO95DYpxkXTZ69rjAhsuhtRu4gdHQ==","shasum":"aac55488e0d4ecd66f2a45e057f90ca2edf59a5b","tarball":"https://registry.npmjs.org/@brunobuddy/d3-v6-tip/-/d3-v6-tip-0.0.3.tgz","fileCount":9,"unpackedSize":32809,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE5jjbjKkbitz00ma59OFx5mIQxWfbV837fBfmndjKaRAiA0jiAnBDqZU4rS1vuDi5A9w2axakmTp9x60zDuNN7PEQ=="}]},"_npmUser":{"name":"brunobuddy","email":"bruno@buddyweb.fr"},"directories":{},"maintainers":[{"name":"brunobuddy","email":"bruno@buddyweb.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/d3-v6-tip_0.0.3_1634712306373_0.9299107054039562"},"_hasShrinkwrap":false},"0.0.4":{"name":"@brunobuddy/d3-v6-tip","version":"0.0.4","description":"d3-v6-tip Module","keywords":["d3","d3-module"],"license":"BSD-3-Clause","main":"build/d3-v6-tip.js","jsnext:main":"index","homepage":"https://github.com/bumbeishvili/d3.tip-for-d3.v6","repository":{"type":"git","url":"git+https://github.com/bumbeishvili/d3.tip-for-d3.v6.git"},"scripts":{"pretest":"rm -rf build && mkdir build && rollup -g d3-selection:d3 -f umd -n d3 -o build/d3-v6-tip.js -- index.js","test":"tape 'test/**/*-test.js'","prepublish":"npm run test && uglifyjs build/d3-v6-tip.js -c -m -o build/d3-v6-tip.min.js","postpublish":"zip -j build/d3-v6-tip.zip -- LICENSE README.md build/d3-v6-tip.js build/d3-v6-tip.min.js"},"devDependencies":{"rollup":"0.27","tape":"4","uglify-es":"3"},"dependencies":{"d3-selection":"2"},"gitHead":"a049e2c705c41f884b5736749a7688f6f6334e4e","bugs":{"url":"https://github.com/bumbeishvili/d3.tip-for-d3.v6/issues"},"_id":"@brunobuddy/d3-v6-tip@0.0.4","_nodeVersion":"14.15.4","_npmVersion":"7.5.6","dist":{"integrity":"sha512-oS8zuPA2ny/SKU4A00/9dDh3k9g7CDL44oVE8zRhths5BwomD+37tGLzSpo2CClXDMUY3CU7CGWhxvAhqK1sDg==","shasum":"80292697dbbe7fb8f00a45752b9d2e08db5802ac","tarball":"https://registry.npmjs.org/@brunobuddy/d3-v6-tip/-/d3-v6-tip-0.0.4.tgz","fileCount":8,"unpackedSize":27704,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzaIiCRA9TVsSAnZWagAAF7cP/RcRFI1PudILRZG3Nty7\nKzLkaZrOkV4aXbq4WXfjRAWiywUMr4aq/UXDvLaEgIA1evBU7O7Rms3nW2z3\nLTKDNkdCHcO1OwUqEQcaPZ4EU4iE7KFwGWW34wwerbFbYErI9ZlRzHMsN3rb\ngnmldJhDYeiZhtafMpiQMbtZmTdwHIf4PUWr9413J3+ymo0OixI6TX3vp1Xp\nbvNDdqcOXmeHCsypVSSky/l7PI7POn3PaMqfqYGdIxkjGLftMf5vtt0QuDWG\n21jUuSlbaW/KN1JFaLxMu9tCTvhuI8MDvUZJ3VoCU/+BpJvvtTDc2bfktzos\nqMJS/MO3peenZgiPDX+L8Y8z8is+RGWt8DAN1hLZCDODI+EK913fGhi/vH8a\nChm7how2MrjOcvVHVJyCacpsydyZracaI7e5IEOSGaaSRTV0jlaMq/b5KMUJ\nSsL6jeiF8a1F0wDlfdcTQAaEIf8I1DB9uDaQ35zB/WrkIErO5iJChc0Uf8ym\ndVt/ZsHi0ejtOX1uLTUQqwujzOZCfOABcIRq/hA6h7ryNO+oIwx5rNYHsqWP\nHHgX3qk9BU4jSYY6dzhJDUxJm4basB/ZVlJ7lr0O86WzwI79pJIpKBKjb2EO\nj+l2CD9MGD5vnxP9/qfPQFhjBQEXEG9VXtZINxTRsNT7eJQFNDjM9Y2pr3HJ\nFskT\r\n=HMU0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTBh+VBRzzceAKLiqfCzlnbLjo5TumixxoIJ6OeS9kwAIgZI7698/s1PgyYuRcT2NO1BlEi+KwVz6zNxPdbydJ1R0="}]},"_npmUser":{"name":"brunobuddy","email":"bruno@buddyweb.fr"},"directories":{},"maintainers":[{"name":"brunobuddy","email":"bruno@buddyweb.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/d3-v6-tip_0.0.4_1634712386610_0.8417409448648099"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-20T06:32:17.266Z","0.0.1":"2021-10-20T06:32:17.602Z","modified":"2022-04-04T20:49:20.310Z","0.0.2":"2021-10-20T06:38:53.331Z","0.0.3":"2021-10-20T06:45:06.737Z","0.0.4":"2021-10-20T06:46:26.751Z"},"maintainers":[{"name":"brunobuddy","email":"bruno@buddyweb.fr"}],"description":"d3-v6-tip Module","homepage":"https://github.com/bumbeishvili/d3.tip-for-d3.v6","keywords":["d3","d3-module"],"repository":{"type":"git","url":"git+https://github.com/bumbeishvili/d3.tip-for-d3.v6.git"},"bugs":{"url":"https://github.com/bumbeishvili/d3.tip-for-d3.v6/issues"},"license":"BSD-3-Clause","readme":"# d3-v6-tip\nA famous d3-tip lib adapted to the latest - d3.v6 version.\n\n![](https://user-images.githubusercontent.com/6873202/92922793-6e621b00-f447-11ea-933d-50bac9a25fbb.gif)\n\n\n## Foreword\n\nd3.v6 introduced several changes and some of them concerns d3-tip.\n\nThose are:\n\n* Global d3.event has been removed\n* Every event handler, from now on, will receive event as a first argument\n\nd3-tip version which lies under this repository, is adapted to this change.\n\nIt also fixes one annoying bug, when several DOM tip instances were being created , which eventually would lead unexpected and undesirable results.\n\nSee [original documentation](https://github.com/caged/d3-tip/blob/master/docs/index.md), but please note changes in `tip.html` API.   \nShort story is that, you will get same arguments in `tip.html()` as `tip.show()` receives, in the same order.\n\n## Installing\nIf you are using npm\n\n```npm i d3-v6-tip```\n\nAnd then use it like this in your application\n```javascript\nimport { tip as d3tip } from \"d3-v6-tip\";\n\nconst tip = d3tip()\n```\n\nOtherwise, you can load as a standalone library or as part of D3. ES modules, AMD, CommonJS, and vanilla environments are supported. In vanilla, a d3 global is exported:\n\nIf you want to load it as part of d3\n```html\n<script src=\"https://d3js.org/d3.v6.min.js\"></script>\n<script src=\"https://unpkg.com/d3-v6-tip@1.0.6/build/d3-v6-tip.js\"></script>\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/bumbeishvili/d3-tip-for-v6@4/d3-tip.min.css\">\n\n<script>\n\nconst tip = d3.tip()\n\n</script>\n```\n\nIf you want to load it as standalone\n```html\n<script src=\"https://d3js.org/d3-selection.v2.min.js\"></script>\n<script src=\"https://unpkg.com/d3-v6-tip@1.0.6/build/d3-v6-tip.js\"></script>\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/bumbeishvili/d3-tip-for-v6@4/d3-tip.min.css\">\n\n<script>\nvar svg = d3.select('svg');\n\n/* Initialize tooltip */\nvar tip = d3.tip().attr('class', 'd3-tip').html((EVENT,d)=> d );\n\n    \n/* Invoke the tip in the context of your visualization */\nsvg.call(tip)\n\n    \n// -------------- Simplest usage ----------------\nsvg.selectAll('rect')\n    .on('mouseover', tip.show)\n    .on('mouseout', tip.hide)\n        \n    \n// ------------- Conditional usage -------------\nsvg.selectAll('rect')\n    .on('mouseover', (event,d)=>{\n          if(someCondition) tip.show(event,d);\n     })\n    .on('mouseout', tip.hide)\n    \n    \n// ------------- Showing tip on particular element, but based on other DOM element's data -------------\nsvg.selectAll('g')\n    .on('mouseover', function(event,d) {\n          const element = d3.select(this)\n                            .select('.particular-element');\n          tip.show(event, d, element.node())\n     })\n    .on('mouseout', tip.hide)\n</script>\n```\n\n\nSee   [minimal jsfiddle example here](https://jsfiddle.net/aftjeb0g/2/)\n\n\n\n\n## Style\nfor default styling, include this [css file](https://github.com/bumbeishvili/d3-v6-tip/blob/master/src/d3-tip.css) into your app\n```css\n.d3-tip {\n  font-family: Arial, Helvetica, sans-serif;\n  line-height: 1.4;\n  padding: 20px;\n  pointer-events: none !important;\n  color: #203d5d;\n  box-shadow: 0 4px 20px 4px rgba(0, 20, 60, .1), 0 4px 80px -8px rgba(0, 20, 60, .2);\n  background-color: #fff;\n  border-radius: 4px;\n}\n\n/* Creates a small triangle extender for the tooltip */\n.d3-tip:after {\n  box-sizing: border-box;\n  display: inline;\n  font-size: 10px;\n  width: 100%;\n  line-height: 1;\n  color: #fff;\n  position: absolute;\n  pointer-events: none;\n}\n\n/* Northward tooltips */\n.d3-tip.n:after {\n  content: \"▼\";\n  margin: -1px 0 0 0;\n  top: 100%;\n  left: 0;\n  text-align: center;\n}\n\n/* Eastward tooltips */\n.d3-tip.e:after {\n  content: \"◀\";\n  margin: -4px 0 0 0;\n  top: 50%;\n  left: -8px;\n}\n\n/* Southward tooltips */\n.d3-tip.s:after {\n  content: \"▲\";\n  margin: 0 0 1px 0;\n  top: -8px;\n  left: 0;\n  text-align: center;\n}\n\n/* Westward tooltips */\n.d3-tip.w:after {\n  content: \"▶\";\n  margin: -4px 0 0 -1px;\n  top: 50%;\n  left: 100%;\n}\n```\n\n\n## History\n\n* [Caged](https://github.com/caged/d3-tip) created d3-tip for d3.v3\n* [cgav](https://github.com/cgav/d3-tip) converted it to d3-v4 and ES6 code\n* [VACLAB](https://github.com/VACLab/d3-tip) removed ES6 specific code for wider browser support\n* [bumbeishvili](https://github.com/bumbeishvili/d3-tip-v6) adapted for newer d3.v6 version and [published to NPM](https://www.npmjs.com/package/d3-v6-tip)\n\n\n## Repo Author\n [David   B (twitter)](https://twitter.com/dbumbeishvili)  \n [David   B (linkedin)](https://www.linkedin.com/in/bumbeishvili/)  \n\nI am available for freelance data visualization work. Please [contact me](https://davidb.dev/contact) in case you'd like me to help you with my experience and expertise\n\nYou can also [book data viz related consultation session](https://www.fiverr.com/share/4XxG21) with me\n","readmeFilename":"README.md"}