diff --git a/components/chart.js b/components/chart.js index eaa38ac..dad86b6 100644 --- a/components/chart.js +++ b/components/chart.js @@ -24,6 +24,8 @@ const temperatureScale = { high: 40 } const cycleDaysToShow = 40 +const dotRadius = 4 +const curveColor = 'darkblue' export default class CycleChart extends Component { constructor(props) { @@ -183,20 +185,30 @@ function makeCurveCoordinatesForChunk(chunk) { const match = this.xAxisTicks.find(tick => tick.label === cycleDay.date) const x = match.rightOffset + columnWidth / 2 const y = normalizeToScale(cycleDay.temperature.value) - return [x, y].join() + return [x, y] }) - .join(' ') } function makeCurveFromPoints(curveChunkPoints, i) { + const pointsInPolyLineFormat = curveChunkPoints + .map(xYPair => xYPair.join()) + .join(' ') + return ( - + + + { makeDots(curveChunkPoints) } + ) +} + +function makeDots(points) { + return points.map(([x, y], i) => ) } \ No newline at end of file