Graph curve missing
-
I am building a little canvas element that contains a line graph. However, whilst it shows up in the simulator the line remains stubbornly missing when deploying to my Vertical. Any ideas?
ctx.strokeStyle = '#0000FF'; ctx.lineWidth = 2; ctx.beginPath(); for (i = 0; i < graphValues.length; i++) { x = left + width * i / (graphValues.length - 1); value = graphValues[i]; y = graphBottom - ( (value - MEAN_LEVEL) * amplitudeScale / 1.80 + 0.5 ) * height; y = Math.max(graphTop, Math.min(graphBottom, y)); if (i === 0) { ctx.moveTo(x, y); } else { ctx.lineTo(x, y); } } -
Ok, seems like the watch only renders 12 points, not 96… For now I’ll use a stepped line.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login