How to use the d3-selection.selection.prototype function in d3-selection

To help you get started, we’ve selected a few d3-selection examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 1wheel / d3-jetpack-module / index.js View on Github external
import {selection} from "d3-selection";
import {transition} from "d3-transition";

import translateSelection from "./src/translate-selection";
import append from "./src/append";
import parent from "./src/parent";
import selectAppend from "./src/selectAppend";
import tspans from "./src/tspans";
import appendMany from "./src/appendMany";
import at from "./src/at";
import st from "./src/st";

selection.prototype.translate = translateSelection;
transition.prototype.translate = translateSelection;
selection.prototype.append = append;
selection.prototype.parent = parent;
selection.prototype.selectAppend = selectAppend;
selection.prototype.tspans = tspans;
selection.prototype.appendMany = appendMany;
selection.prototype.at = at;
selection.prototype.st = st;
transition.prototype.at = at;
transition.prototype.st = st;
selection.prototype.prop = selection.prototype.property;

export {default as wordwrap} from "./src/wordwrap";
export {default as parseAttributes} from "./src/parseAttributes";
export {default as f} from "./src/f";
export {default as ascendingKey} from "./src/ascendingKey";
export {default as descendingKey} from "./src/descendingKey";
export {default as conventions} from "./src/conventions";
export {default as attachTooltip} from "./src/attachTooltip";
github wbkd / d3-extended / index.js View on Github external
import { default as toggleClass } from './src/toggleClass';

selection.prototype.addClass = addClass;
selection.prototype.after = after;
selection.prototype.appendTo = appendTo;
selection.prototype.before = before;
selection.prototype.clear = clear;
selection.prototype.css = css;
selection.prototype.eq = eq;
selection.prototype.first = first;
selection.prototype.hasClass = hasClass;
selection.prototype.hide = hide;
selection.prototype.last = last;
selection.prototype.moveToBack = moveToBack;
selection.prototype.moveToFront = moveToFront;
selection.prototype.on = on;
selection.prototype.prepend = prepend;
selection.prototype.removeClass = removeClass;
selection.prototype.show = show;
selection.prototype.toggle = toggle;
selection.prototype.toggleClass = toggleClass;
github caged / d3-tip / index.js View on Github external
tip.style = function(n, v) {
    if (arguments.length < 2 && typeof n === 'string') {
      return getNodeEl().style(n)
    }

    var args = Array.prototype.slice.call(arguments)
    selection.prototype.style.apply(getNodeEl(), args)
    return tip
  }
github wbkd / d3-extended / index.js View on Github external
import { default as moveToBack } from './src/moveToBack';
import { default as moveToFront } from './src/moveToFront';
import { default as on } from './src/on';
import { default as prepend } from './src/prepend';
import { default as removeClass } from './src/removeClass';
import { default as show } from './src/show';
import { default as toggle } from './src/toggle';
import { default as toggleClass } from './src/toggleClass';

selection.prototype.addClass = addClass;
selection.prototype.after = after;
selection.prototype.appendTo = appendTo;
selection.prototype.before = before;
selection.prototype.clear = clear;
selection.prototype.css = css;
selection.prototype.eq = eq;
selection.prototype.first = first;
selection.prototype.hasClass = hasClass;
selection.prototype.hide = hide;
selection.prototype.last = last;
selection.prototype.moveToBack = moveToBack;
selection.prototype.moveToFront = moveToFront;
selection.prototype.on = on;
selection.prototype.prepend = prepend;
selection.prototype.removeClass = removeClass;
selection.prototype.show = show;
selection.prototype.toggle = toggle;
selection.prototype.toggleClass = toggleClass;
github wbkd / d3-extended / index.js View on Github external
selection.prototype.addClass = addClass;
selection.prototype.after = after;
selection.prototype.appendTo = appendTo;
selection.prototype.before = before;
selection.prototype.clear = clear;
selection.prototype.css = css;
selection.prototype.eq = eq;
selection.prototype.first = first;
selection.prototype.hasClass = hasClass;
selection.prototype.hide = hide;
selection.prototype.last = last;
selection.prototype.moveToBack = moveToBack;
selection.prototype.moveToFront = moveToFront;
selection.prototype.on = on;
selection.prototype.prepend = prepend;
selection.prototype.removeClass = removeClass;
selection.prototype.show = show;
selection.prototype.toggle = toggle;
selection.prototype.toggleClass = toggleClass;
github gka / d3-jetpack / essentials.js View on Github external
import selectAppend from "./src/selectAppend";
import tspans from "./src/tspans";
import appendMany from "./src/appendMany";
import at from "./src/at";
import st from "./src/st";

selection.prototype.translate = translateSelection;
selection.prototype.append = append;
selection.prototype.insert = insert;
selection.prototype.parent = parent;
selection.prototype.selectAppend = selectAppend;
selection.prototype.tspans = tspans;
selection.prototype.appendMany = appendMany;
selection.prototype.at = at;
selection.prototype.st = st;
selection.prototype.prop = selection.prototype.property;

export {default as parseAttributes} from "./src/parseAttributes";
export {default as f} from "./src/f";
export {default as ascendingKey} from "./src/ascendingKey";
export {default as descendingKey} from "./src/descendingKey";
export {default as nestBy} from "./src/nestBy";
export {default as round} from "./src/round";
export {default as clamp} from "./src/clamp";
github wbkd / d3-extended / index.js View on Github external
import { default as hide } from './src/hide';
import { default as last } from './src/last';
import { default as moveToBack } from './src/moveToBack';
import { default as moveToFront } from './src/moveToFront';
import { default as on } from './src/on';
import { default as prepend } from './src/prepend';
import { default as removeClass } from './src/removeClass';
import { default as show } from './src/show';
import { default as toggle } from './src/toggle';
import { default as toggleClass } from './src/toggleClass';

selection.prototype.addClass = addClass;
selection.prototype.after = after;
selection.prototype.appendTo = appendTo;
selection.prototype.before = before;
selection.prototype.clear = clear;
selection.prototype.css = css;
selection.prototype.eq = eq;
selection.prototype.first = first;
selection.prototype.hasClass = hasClass;
selection.prototype.hide = hide;
selection.prototype.last = last;
selection.prototype.moveToBack = moveToBack;
selection.prototype.moveToFront = moveToFront;
selection.prototype.on = on;
selection.prototype.prepend = prepend;
selection.prototype.removeClass = removeClass;
selection.prototype.show = show;
selection.prototype.toggle = toggle;
selection.prototype.toggleClass = toggleClass;
github d3 / d3-transition / src / selection / index.js View on Github external
import {selection} from "d3-selection";
import selection_interrupt from "./interrupt.js";
import selection_transition from "./transition.js";

selection.prototype.interrupt = selection_interrupt;
selection.prototype.transition = selection_transition;
github gka / d3-jetpack / essentials.js View on Github external
import translateSelection from "./src/translate-selection";
import append from "./src/append";
import insert from "./src/insert";
import parent from "./src/parent";
import selectAppend from "./src/selectAppend";
import tspans from "./src/tspans";
import appendMany from "./src/appendMany";
import at from "./src/at";
import st from "./src/st";

selection.prototype.translate = translateSelection;
selection.prototype.append = append;
selection.prototype.insert = insert;
selection.prototype.parent = parent;
selection.prototype.selectAppend = selectAppend;
selection.prototype.tspans = tspans;
selection.prototype.appendMany = appendMany;
selection.prototype.at = at;
selection.prototype.st = st;
selection.prototype.prop = selection.prototype.property;

export {default as parseAttributes} from "./src/parseAttributes";
export {default as f} from "./src/f";
export {default as ascendingKey} from "./src/ascendingKey";
export {default as descendingKey} from "./src/descendingKey";
export {default as nestBy} from "./src/nestBy";
export {default as round} from "./src/round";
export {default as clamp} from "./src/clamp";
github d3 / d3-selection-multi / index.js View on Github external
import {selection} from "d3-selection";
import {transition} from "d3-transition";
import selection_attrs from "./src/selection/attrs";
import selection_styles from "./src/selection/styles";
import selection_properties from "./src/selection/properties";
import transition_attrs from "./src/transition/attrs";
import transition_styles from "./src/transition/styles";

selection.prototype.attrs = selection_attrs;
selection.prototype.styles = selection_styles;
selection.prototype.properties = selection_properties;
transition.prototype.attrs = transition_attrs;
transition.prototype.styles = transition_styles;