Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
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)
}
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
}
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)
}
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;
}
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
}
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
}
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 () {
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
}
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);
}