Dojo (Dojo Toolkit)


dojo 1) is a framework based around the AMD module and specification that provides:


Charting With Dojo

Example: 3)

  • Add the dojo library in your HTML page
<script src=""></script>
  • The html where the graph will be rendered
<div id="chartOne"></div>
  • Run
require(["dojox/charting/Chart", "dojox/charting/axis2d/Default", "dojox/charting/plot2d/StackedAreas", "dojox/charting/themes/Wetland" , "dojo/ready"],
  function(Chart, Default, StackedAreas, Wetland, ready){
      var c = new Chart("chartOne");
      c.addPlot("default", {type: StackedAreas, tension:3})
        .addAxis("x", {fixLower: "major", fixUpper: "major"})
        .addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major", min: 0})
        .addSeries("Series A", [1, 2, 0.5, 1.5, 1, 2.8, 0.4])
        .addSeries("Series B", [2.6, 1.8, 2, 1, 1.4, 0.7, 2])
        .addSeries("Series C", [6.3, 1.8, 3, 0.5, 4.4, 2.7, 2])

Loading and using a third party library: bower.js to print your browser

  • Add the dojo library in your HTML page
<script src=""></script>
  • Require
require([''], function(bowser) {
   const browser = bowser.getParser(window.navigator.userAgent);
   console.log(`Your browser name is "${browser.getBrowserName()}"`);

Discover More
Javascript - Asynchronous Module Definition (AMD)

The AMD specifies a mechanism for defining modules such that: the module and its dependencies can be specified and loaded asynchronously. ie Both the module and dependencies can be asynchronously...
Javascript - Linter / Minification (EsLint / Tern / Uglify)

This page is linter / minification in Javascript Linter are used under the hood by bundler in the optimization phase. Name Language Description eslint/eslintESLint Javascript A linter (identifying...
Javascript - Module Loader (Script Loader)

A loader searches and loads module and script into the javascript engine (environment). From the main script, they will: create a dependency graph from the require and import statement find them...
What is RequireJs: the browser module loader ?

RequireJs is a browser module loader that implements the AMD specification . It may load also other modules (UMD, CommonJs) In this example, we will load the bowser...

Share this page:
Follow us:
Task Runner