Git Product home page Git Product logo

Comments (2)

jrsquared avatar jrsquared commented on May 22, 2024

Ah, yep, fixed my comment on the previous issue. I just said to open a new issue, which you did!

Very close! A few issues:

  • The actual constructor is Vizceral.default.
  • It's a constructor, so you have to call new Vizceral.default.
  • maxVolume is required for graphs
  • You need to call viz.animate() to load and start the animation

One issue as far as graph layout goes on my end: I still expect there to be one entry node, and that entry node to be named 'INTERNET'. That is hard coded in a few places, and at some point, I think this expectation should be removed. (FWIW, this requirement is documented in DATAFORMATS.md)

All that being said, here's a working example (at least in Firefox 48):

<html>
  <head>
    <script src="./lib/vizceral_ecs6.js"></script>
    <script>
      function run( ) {
        var viz = new Vizceral.default(document.getElementById('test'));
        viz.updateData({name: 'us-west-2', renderer: 'global', nodes: [{name: 'INTERNET'},{name: 'b'}], connections: [{source: 'INTERNET', target: 'b'}], maxVolume: 100});
        viz.setView();
        viz.animate();
     }
  </script>
  </head>
  <body onload='javascript:run( )'>
    <canvas id='test'></canvas>
  </body>
</html>

from vizceral.

jasonwr avatar jasonwr commented on May 22, 2024

@jrsquared Eureka it works! Thank you!

from vizceral.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.