How to use the d3-selection.namespaces 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 contiamo / operational-ui / packages / visualizations / lib / Chart / canvas.js View on Github external
ChartCanvas.prototype.insertDrawingContainer = function () {
        var drawingContainer = document.createElementNS(d3.namespaces["xhtml"], "div");
        this.chartContainer.node().appendChild(drawingContainer);
        return d3.select(drawingContainer).attr("class", styles.drawingContainer);
    };
    // El
github contiamo / operational-ui / packages / visualizations / src / Chart / canvas.ts View on Github external
private renderChartContainer(context: Element): D3Selection {
    const container = document.createElementNS(d3.namespaces["xhtml"], "div")
    context.appendChild(container)
    container.addEventListener("mouseenter", this.onMouseEnter.bind(this))
    container.addEventListener("mouseleave", this.onMouseLeave.bind(this))
    container.addEventListener("click", this.onClick.bind(this))
    return d3.select(container)
  }
github contiamo / operational-ui / packages / visualizations / src / Sunburst / canvas.ts View on Github external
private renderBreadcrumb(): D3Selection {
    const el: Element = document.createElementNS(d3.namespaces["xhtml"], "div")
    this.chartContainer.node().appendChild(el)
    this.elMap.breadcrumb = d3.select(el).attr("class", localStyles.breadcrumb)
    return this.elMap.breadcrumb
  }
github contiamo / operational-ui / packages / visualizations / src / ProcessFlow / canvas.ts View on Github external
private renderChartContainer(context: Element): D3Selection {
    const container: Element = document.createElementNS(d3.namespaces["xhtml"], "div")
    context.appendChild(container)
    return d3.select(container).attr("class", styles.chartContainer)
  }
github contiamo / operational-visualizations / src / Chart / canvas.ts View on Github external
private renderComponentFocus(): D3Selection {
    const focusEl = d3
      .select(document.createElementNS(d3.namespaces.xhtml, "div"))
      .attr("class", "component-focus")
      .style("visibility", "hidden");
    const ref = this.chartContainer.node();
    ref.insertBefore(focusEl.node(), ref.nextSibling);
    return focusEl;
  }
github contiamo / operational-ui / packages / visualizations / src / Chart / canvas.ts View on Github external
private renderComponentFocus(): D3Selection {
    const focusEl = d3
      .select(document.createElementNS(d3.namespaces["xhtml"], "div"))
      .attr("class", "component-focus")
      .style("visibility", "hidden")
    const ref = this.chartContainer.node()
    ref.insertBefore(focusEl.node(), ref.nextSibling)
    return focusEl
  }
github contiamo / operational-ui / packages / visualizations / src / PieChart / canvas.ts View on Github external
private renderEl(): D3Selection {
    const el = document.createElementNS(d3.namespaces["svg"], "svg")
    this.drawingContainer.node().appendChild(el)
    this.elMap.series = d3.select(el)
    return this.elMap.series
  }
github contiamo / operational-ui / packages / visualizations / lib / utils / canvas.js View on Github external
Canvas.prototype.insertContainer = function (context) {
        var container = d3
            .select(document.createElementNS(d3.namespaces["xhtml"], "div"))
            .attr("class", "" + styles.chartContainer);
        context.appendChild(container.node());
        return container;
    };
    Canvas.prototype.insertEl = function () {
github contiamo / operational-ui / packages / visualizations / src / Sunburst / canvas.ts View on Github external
private renderRootLabel(): D3Selection {
    const el = d3
      .select(document.createElementNS(d3.namespaces["xhtml"], "div"))
      .attr("class", localStyles.rootLabel)
      .html("<span class="value"></span><br><span class="name"></span>")
    this.chartContainer.node().appendChild(el.node())
    this.elMap.rootLabel = el
    return el
  }
github contiamo / operational-visualizations / src / Sunburst / canvas.ts View on Github external
private renderChartContainer(context: Element) {
    const container = document.createElementNS(d3.namespaces.xhtml, "div");
    context.appendChild(container);
    return d3
      .select(container)
      .attr("class", styles.chartContainer)
      .style("background-color", this.state.current.getConfig().backgroundColor);
  }