Bladeren bron

vpc graphing feature complete

Chris Mague 6 jaren geleden
bovenliggende
commit
23f2f6b5b4
4 gewijzigde bestanden met toevoegingen van 32 en 4 verwijderingen
  1. 3 3
      config.ru
  2. 26 0
      web/static/css/dendogram.css
  3. 1 0
      web/views/base_layout.erb
  4. 2 1
      web/views/graphview.erb

+ 3 - 3
config.ru

@@ -4,9 +4,9 @@
 require File.join(File.dirname(__FILE__), 'web', 'controllers')
 
 # serve up static assets using rack
-# map "/js" do
-#  run Rack::Directory.new("#{File.join(File.dirname(__FILE__), 'web', 'static', 'js')}")
-# end
+ map "/css" do
+  run Rack::Directory.new("#{File.join(File.dirname(__FILE__), 'web', 'static', 'css')}")
+ end
 
 map '/' do
   run Toppage

+ 26 - 0
web/static/css/dendogram.css

@@ -0,0 +1,26 @@
+<style>
+
+.node circle {
+  fill: #999;
+}
+
+.node text {
+  font: 10px sans-serif;
+}
+
+.node--internal circle {
+  fill: #555;
+}
+
+.node--internal text {
+  text-shadow: 0 1px 0 #fff, 0 -1px 0 #fff, 1px 0 0 #fff, -1px 0 0 #fff;
+}
+
+.link {
+  fill: none;
+  stroke: #555;
+  stroke-opacity: 0.4;
+  stroke-width: 1.5px;
+}
+
+</style>

+ 1 - 0
web/views/base_layout.erb

@@ -7,6 +7,7 @@
     <meta name="author" content="">
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
     <link rel="icon" href="../../favicon.ico">
+    <link rel="stylesheet" href="/css/dendogram.css">
     <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
 
 

+ 2 - 1
web/views/graphview.erb

@@ -1,4 +1,5 @@
-<center><svg width="900" height="600"></svg></center>
+<center><h3> <%= graph_type %></h3>
+<svg width="900" height="600"></svg></center>
 <script src="http://d3js.org/d3.v4.min.js"></script>
 <script>