All versions of this documentation


Load graph data from a JSON file retrieved over HTTP. Here we also load node icons from a font. The content of the file is available here.

Open in a new window.
          <!DOCTYPE html>

  <meta charset="utf-8">
  <link href="" rel="stylesheet">
  <script src="../build/ogma.min.js"></script>
    #graph-container {
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      position: absolute;
      margin: 0;
      overflow: hidden;

  <!-- we force the loading of the font awesome -->
  <i class="fa fa-camera-retro fa-1x" style="color: rgba(0,0,0,0);"></i>
  <div id="graph-container"></div>
    'use strict';

    var ogma = new Ogma({
      container: 'graph-container'

    ogma.parse.jsonFromUrl('files/solarCity.json').then(function (graph) {
      console.log('import done');