Links

Content Skeleton

This Page

Previous topic

Plotting

Next topic

Plotting from a CSV

Graphing

Many js charting/plotting libs

highcharts in sphinx ?

http://stackoverflow.com/questions/9444342/adding-a-javascript-script-tag-some-place-so-that-it-works-for-every-file-in-sph

http://sphinx.pocoo.org/templating.html#script_files

Grab from /usr/local/env/plot/Highstock-1.1.6/examples/basic-line/index.htm

Avoid having to work out script depth by removing the direct refernces:

<script src="../../../../_static/js/highstock.js"></script>
<script src="../../../../_static/js/modules/exporting.js"></script>

Instead reference the js from an added _templates/layout.html:

{% extends "!layout.html" %}

{% set script_files = script_files + ["_static/js/highstock.js","_static/js/modules/exporting.js"] %}

{% block rootrellink %}
    <li><a href="http://project.invalid/">Project Homepage</a> &raquo;</li>
        {{ super() }}
        {% endblock %}

Where the js is refering to:

/Users/blyth/w/_static/js -> /usr/local/env/plot/Highstock-1.1.6/js

And using a raw html directive to embed the javascript(use show source on right to see this) that accesses the data and configures the plot:

In addition to the script a html div is needed (can be done together) with id matching that used in script setup: