# How to use GoJS HTML5 Canvas Library for drawing diagrams and graphs?

HTMLWeb DevelopmentFront End Technology

GoJS is a JavaScript library, which you can use to implement interactive diagrams. This page will show you the essentials of using GoJS. If you want to add diagrams and graphs, then use this library, which is Open Source.

GoJS has a model-view architecture, in which Models holds arrays of JavaScript objects, which describe nodes and links. To visualize this data using actual Node and Link objects, the Diagrams act as views.

Constructing a Diagram with GoJS creates an HTML5 Canvas element to be placed inside the given DIV element.

## How to draw a diagram

Start working with GoJS, you need to declare the library in the HTML document. With that, you need to load the library too. Load the GoJS library go.js.

<script src="https://cdnjs.cloudflare.com/ajax/libs/gojs/1.7.20/go-debug.js"></script>