in src/visual.ts [854:891]
private drawLine(linePathSelection: d3.Selection<d3.BaseType, LineDotPoint[], any, any>) {
const linePathSelectionMerged = linePathSelection
.enter()
.append("g")
.merge(linePathSelection);
linePathSelectionMerged
.classed(LineDotChart.pathClassName, true);
let pathPlot: d3.Selection<d3.BaseType, LineDotPoint[], any, any> = linePathSelectionMerged
.selectAll(LineDotChart.pathPlotClassName)
.data(d => [d]);
const pathPlotMerged = pathPlot
.enter()
.append("path")
.merge(pathPlot);
pathPlotMerged
.classed(LineDotChart.plotClassName, true);
// Draw the line
const drawLine: d3.Line<LineDotPoint> = d3.line<LineDotPoint>()
.x((dataPoint: LineDotPoint) => {
return this.xAxisProperties.scale(dataPoint.dateValue.value);
})
.y((dataPoint: LineDotPoint) => {
return this.yAxisProperties.scale(dataPoint.value);
});
pathPlotMerged
.attr("stroke", () => this.settings.lineoptions.fill)
.attr("stroke-width", this.settings.lineoptions.lineThickness)
.attr("d", drawLine)
.attr("clip-path", "url(" + location.href + "#" + LineDotChart.lineClip + ")");
return linePathSelectionMerged;
}