rjchallis / assembly-stats

Assembly statistic visualisation
http://genomehubs.org
MIT License
88 stars 83 forks source link

Can't get a web resulted? #4

Closed tiramisutes closed 7 years ago

tiramisutes commented 7 years ago

I'm following README file written this html file, but get an empty web page when opening it with google chrome.

<html>
<head>
    <title>assembly stats</title>
  </head>
  <body>
    <link rel="stylesheet" type="text/css" href="css/circle-plot.css">
    <link rel="stylesheet" type="text/css" href="css/square-plot.css">
    <link rel="stylesheet" type="text/css" href="css/table.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
    <script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script>
    <script src="http://labratrevenge.com/d3-tip/javascripts/d3.tip.v0.6.3.js"></script>
    <script type="text/javascript" src="js/circle-plot.js"></script>
    <script type="text/javascript" src="js/square-plot.js"></script>
    <script type="text/javascript" src="js/table.js"></script>
    <div id="assembly_stats">
    <script charset="utf-8" src="d3.js"></script>
    <script>
      d3.json("Danaus_plexippus_v3.assembly-stats.json", function(error, json) {
        if (error) return console.warn(error);
        asm = new Assembly (json);
        asm.drawPlot('assembly_stats');
      })
    </script>

  </body>
</html>
rjchallis commented 7 years ago

Sorry, I made a few changes while incorporating this into another project (at genomehubs.org) and it looks like I need to update the README a little. Meanwhile it only needs a couple of changes to get your web page working...

The example json file is now in a subdirectory so you'll need to change the d3.json(... line to

d3.json("json/Danaus_plexippus_v3.assembly-stats.json", function(error, json) {

and the line sourcing d3.js is not needed as it loads a version from d3js.org so you can delete

<script charset="utf-8" src="d3.js"></script>