sol108 = config => {
config = {
data: null,
columnLength: 100,
circleFill: '#a6d40d',
strokeCol: '#ff5ec4',
strokeWidth: 1,
...config,
}
const { data, circleFill, strokeCol } = config
const svg = DOM.svg(width, height)
const sel = d3.select(svg)
data.forEach((o, n) => {
sel.selectAll('line.id-' + n)
.data(data)
.enter('line.id-' + n).append('line')
.attr('x1', data[n].x)
.attr('y1', data[n].y)
.attr('x2', d => d.x)
.attr('y2', d => d.y)
.attr('stroke', strokeCol)
.attr('stroke-width', config.strokeWidth)
.style('opacity', 0.1)
})
sel.selectAll('circle')
.data(data)
.join('circle')
.attr('r', 8)
.attr('cx', d => d.x)
.attr('cy', d => d.y)
.style('fill', circleFill)
.style('opacity', 0.5)
return svg
}