How do I use Viz.js?
I have managed to coerce the system into providing the desired result, but I'm not entirely happy with the method.
I have the main function listed in my module's .info file as previously stated.
The function that builds the dot script is a "menu callback", triggered from a views display. I have mimicked the method found here.

After the dot script is built, the function returns:

 &lt;?php
 $gvdata = $gv-&gt;parse();
  $return = '&lt;div id="svgarea"&gt; &lt;/div&gt;';
  $return .= '&lt;textarea id="dotscript" rows="20" cols="80" width="100%" wrap="off"&gt;';
  $return .= $gvdata."\n\n";
  $return .= '&lt;/textarea&gt;';
  return $return;
?&gt;


I get the javascript into the output using the js_injector module to put the following into the footer:

    jQuery(document).ready(function () {

  var svg_div = jQuery('#svgarea');
  var graphviz_data_textarea = jQuery('#dotscript');

  function UpdateGraphviz() {
    svg_div.html("");
    var data = graphviz_data_textarea.val();
    // Generate the Visualization of the Graph into "svg".
    var svg = Viz(data, "svg");
    svg_div.html("&lt;hr&gt;"+svg);
  }

  // Startup function: call UpdateGraphviz
  jQuery(function() {
      UpdateGraphviz();
  });


});


It seems to me there should be a more elegant way to do this.