Skip to content
IGT Visualizer for Xigt data
JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
config.json
xigtviz.css
xigtviz.js

README.md

xigtviz

IGT Visualizer for Xigt data

Usage

Add something like this to your HTML header:

  <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
  <script src="/static/xigtviz.js" charset="utf-8"></script>
  <script>var settings = {{settings|tojson|safe}};</script>
  <link rel="stylesheet" type="text/css" href="/static/xigtviz.css"/>

This assumes you are using Flask. Load config.json and render the template like this:

with open('config.json') as f:
    settings = json.loads(f.read())

@app.route('/')
def index():
    return render_template('index.html', settings=settings)

In your HTML, create a <div id="igt"></div>, load the Xigt IGT as a XigtJSON object, and then render it with a call to igtLayout():

igtLayout("#igt", xigtJsonData);
You can’t perform that action at this time.