Canvas Basic Example

Canvas Basic

Hello HTML5 Canvas. This app demonstrates how to simply draw shapes on an HTML5 canvas. The canvas is a very useful component in HTML5 for creating graphics output, plotting values from sensors for example. For more advanced graph drawing, you can use a JavaScript library such as Flotr2.

Source Code

You can browse the source code for this example at the Evothings GitHub repository

The file index.html contains the HTML markup and JavaScript drawing code of the app.

What You Need

This example runs in Evothings Client on Android or iOS.

How To Get Up And Running

Follow these steps to get started with this example:

  • Run the Evothings Workbench on your desktop/laptop computer.
  • Connect to the Workbench from the Evothings client app.
  • Run the "Canvas Basic" example from the Workbench window.
  • Open the source code file "index.html" and play around with the drawing code.