Skip to content

Instantly share code, notes, and snippets.

View vijithassar's full-sized avatar

Vijith Assar vijithassar

View GitHub Profile
@vijithassar
vijithassar / README.md
Last active October 11, 2016 05:23
d3-rect example

Demonstration of d3-rect, a plugin which simplifies drawing rectangles using path strings instead of rect elements so their shapes can be interpolated.

@vijithassar
vijithassar / README.md
Last active November 12, 2016 22:17
d3-parent example

Demonstration of d3-parent, a plugin that makes it easier to navigate around hierarchical selections and adds a more stable API around parentNode.

@vijithassar
vijithassar / README.md
Last active October 11, 2016 05:29
d3.history example

demonstration of d3.history, a plugin for D3.js which adds support for deep-linking and URLs based on the user interface state. (To see this demonstration with the URL bar intact, you'll need to open it without the iframe.)

@vijithassar
vijithassar / d3-textwrap.min.js
Last active October 10, 2023 11:44
d3textwrap plugin demo
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("d3-selection")):"function"==typeof define&&define.amd?define(["exports","d3-selection"],e):e(t.d3=t.d3||{},t.d3)}(this,function(t,e){"use strict";var n,o,r,i,d,u,p,a;n="undefined"==typeof SVGForeignObjectElement?"tspans":"foreignobject",o=function(t){var n,o;return o="function"==typeof t,"object"!=typeof t||t.nodeType?!!(t instanceof e.selection||t.nodeType||o||n)||(console.error("invalid bounds specified for text wrapping"),!1):!(!t.height||!t.width)||(console.error("text wrapping bounds must specify height and width"),!1)},r=function(t){var e,n,o,r;for(e=["height","width"],"function"==typeof t?n=t():t.nodeType?n=t.getBoundingClientRect():"object"==typeof t&&(n=t),o=Object.create(null),r=0;r<e.length;r++)o[e[r]]=n[e[r]];return o},i=function(t){var e;return"function"==typeof t?e=t():"number"==typeof t?e=t:"undefined"==typeof t&&(e=0),"number"==typeof e?e:void console.error("padding could not be converted into a number")},d=