This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const width = 300 | |
const height = 50 | |
const graph = [1, 2, 5, 0, 5, 0.2, 0.3, 0.4, 3, 9] | |
const peakVal = Math.max(...graph) | |
graph.unshift(0) // dot start | |
graph.push(0) // dot end | |
const part = width / (graph.length - 1) | |
const points = [] | |
for (const i in graph) { |