Use static SDK
Browse files- README.md +1 -2
- index.html +20 -0
README.md
CHANGED
|
@@ -3,8 +3,7 @@ title: Gem Results Test
|
|
| 3 |
emoji: π
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: green
|
| 6 |
-
sdk:
|
| 7 |
-
app_file: app.py
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
|
|
|
|
| 3 |
emoji: π
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: green
|
| 6 |
+
sdk: static
|
|
|
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
|
index.html
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
|
| 5 |
+
</head>
|
| 6 |
+
<body>
|
| 7 |
+
<script type="text/javascript">
|
| 8 |
+
var lineData = [ { "x": 1, "y": 5}, { "x": 20, "y": 20}, { "x": 40, "y": 10}, { "x": 60, "y": 40}, { "x": 80, "y": 5}, { "x": 100, "y": 60}];
|
| 9 |
+
|
| 10 |
+
//This is the accessor function we talked about above
|
| 11 |
+
var lineFunction = d3.svg.line().x(function(d) { return d.x; }).y(function(d) { return d.y; }).interpolate("linear");
|
| 12 |
+
|
| 13 |
+
//The SVG Container
|
| 14 |
+
var svgContainer = d3.select("body").append("svg").attr("width", 200).attr("height", 200);
|
| 15 |
+
|
| 16 |
+
//The line SVG Path we draw
|
| 17 |
+
var lineGraph = svgContainer.append("path").attr("d", lineFunction(lineData)).attr("stroke", "blue").attr("stroke-width", 2).attr("fill", "none");
|
| 18 |
+
</script>
|
| 19 |
+
</body>
|
| 20 |
+
</html>
|