Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. plotno=document.querySelector('canvas')
  2. wartosc=plotno.getContext('2d')
  3. wartosc.fillStyle = "red"
  4. wartosc.fillRect(100, 50, 50, 120)
  5. wartosc.fillRect(151,70,50,100)
  6. wartosc.fillRect(202,30,50,140)
  7. wartosc.fillRect(253,90,50,80)
  8. wartosc.fillRect(304,70,50,100)
  9. wartosc.beginPath();
  10. wartosc.moveTo(100, 30);
  11. wartosc.lineTo(100, 170);
  12. wartosc.lineTo(400, 170);
  13. wartosc.stroke();
  14. wartosc.font = "italic bold 20px Arial";
  15. wartosc.fillText("ilość", 40, 170)
  16. wartosc.fillText("czas", 100, 190)
  17. wartosc.beginPath();
  18. wartosc.moveTo(90, 40);
  19. wartosc.lineTo(100, 30);
  20. wartosc.lineTo(110, 40);
  21. wartosc.stroke();
  22. wartosc.beginPath();
  23. wartosc.moveTo(390, 160);
  24. wartosc.lineTo(400, 170);
  25. wartosc.lineTo(390, 180);
  26. wartosc.stroke();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement