import { nth } from 'lodash-es'; export const lineRender = ({ start, end, color, ctx }) => { ctx.strokeStyle = color; ctx.beginPath(); ctx.setLineDash([3, 2]); ctx.moveTo(nth(start, 0), nth(start, 1)); ctx.lineTo(nth(end, 0), nth(end, 1)); ctx.stroke(); };