Spaces:
Paused
Paused
dushyantsingh0 commited on
Commit ·
da377dd
1
Parent(s): 8a478c0
backend stabilization
Browse files25 unmodified lines2627282930313225 unmodified linesconst max = Math.max(...data, 1);const width = 100;const height = 30;const points = data.map((v, i) => `${(i / (data.length - 1)) * width},${height - (v / max) * height}`).join(' ');return (<svg width={width} height={height} viewBox={`0 0 ${width} ${height}`} style={{ overflow: 'visible' }}><polyline fill="none" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" points={points} />25 unmodified lines262728293031323325 unmodified linesconst max = Math.max(...data, 1);const width = 100;const height = 30;const divisor = data.length > 1 ? data.length - 1 : 1;const points = data.map((v, i) => `${(i / divisor) * width},${height - (v / max) * height}`).join(' ');return (<svg width={width} height={height} viewBox={`0 0 ${width} ${height}`} style={{ overflow: 'visible' }}><polyline fill="none" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" points={points} />
frontend/apps/customer/src/components/Analytics.tsx+2-1