osanseviero commited on
Commit
4c4526f
·
1 Parent(s): f1cd4d1

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +31 -15
index.html CHANGED
@@ -3,22 +3,38 @@
3
  <head>
4
  <meta charset="utf-8" />
5
  <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
  </head>
9
  <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>
13
- You can modify this app directly by editing <i>index.html</i> in the
14
- Files and versions tab.
15
- </p>
16
- <p>
17
- Also don't forget to check the
18
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank"
19
- >Spaces documentation</a
20
- >.
21
- </p>
22
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  </body>
24
  </html>
 
3
  <head>
4
  <meta charset="utf-8" />
5
  <meta name="viewport" content="width=device-width" />
6
+ <title>My Danfo.js Space</title>
7
+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.js"></script>
8
  </head>
9
  <body>
10
+ <div id="plot_div"></div>
11
+ <script>
12
+
13
+ dfd.readCSV(
14
+ "https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv"
15
+ )
16
+ .then((df) => {
17
+ let layout = {
18
+ title: "A financial charts",
19
+ xaxis: {
20
+ title: "Date",
21
+ },
22
+ yaxis: {
23
+ title: "Count",
24
+ },
25
+ };
26
+
27
+ let config = {
28
+ columns: ["AAPL.Open", "AAPL.High"],
29
+ };
30
+
31
+ let new_df = df.setIndex({ column: "Date" });
32
+ new_df.plot("plot_div").line({ config, layout });
33
+ })
34
+ .catch((err) => {
35
+ console.log(err);
36
+ });
37
+
38
+ </script>
39
  </body>
40
  </html>