in src/visualComponent/combo/lineComponent.ts [95:142]
public render(options: ILineComponentRenderOptions): void {
const {
x,
y,
viewport,
thickness,
interpolation,
gradientPoints,
lineStyle,
series,
} = options;
this.renderOptions = options;
const xScale: DataRepresentationScale = x
.copy()
.range([0, viewport.width]);
const yScale: DataRepresentationScale = y
.copy()
.range([viewport.height, 0]);
const lineSelection: Selection<any, IDataRepresentationPointGradientColor, any, any> = this.element
.selectAll(this.lineSelector.selectorName)
.data(gradientPoints);
lineSelection
.exit()
.remove();
this.lineSelection = lineSelection.enter()
.append("svg:path")
.classed(this.lineSelector.className, true)
.on("click", this.clickHandler.bind(this))
.merge(lineSelection)
.attr("d", (gradientGroup: IDataRepresentationPointGradientColor) => {
return this.getLine(
xScale,
yScale,
interpolation,
)(gradientGroup.points);
})
.attr("class", `${this.lineSelector.className} ${lineStyle}`)
.style("stroke", (gradientGroup: IDataRepresentationPointGradientColor) => gradientGroup.color)
.style("stroke-width", () => pixelConverter.toString(thickness));
this.highlight(series && series.hasSelection);
}