Skip to content

Instantly share code, notes, and snippets.

@jeantimex
Last active April 25, 2020 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeantimex/8428b7417c48c360a60d9db18f8d2b0e to your computer and use it in GitHub Desktop.
Save jeantimex/8428b7417c48c360a60d9db18f8d2b0e to your computer and use it in GitHub Desktop.
A simple line chart
license: mit
Date Open High Low Close Adj Close Volume
2019-04-24 1264.119995 1268.010010 1255.000000 1256.000000 1256.000000 1018800
2019-04-25 1264.770020 1267.407959 1252.030029 1263.449951 1263.449951 1107300
2019-04-26 1269.000000 1273.069946 1260.319946 1272.180054 1272.180054 1241400
2019-04-29 1274.000000 1289.270020 1266.295044 1287.579956 1287.579956 2499400
2019-04-30 1185.000000 1192.810059 1175.000000 1188.479980 1188.479980 6207000
2019-05-01 1188.050049 1188.050049 1167.180054 1168.079956 1168.079956 2639200
2019-05-02 1167.760010 1174.189941 1155.001953 1162.609985 1162.609985 1944800
2019-05-03 1173.650024 1186.800049 1169.000000 1185.400024 1185.400024 1980700
2019-05-06 1166.260010 1190.849976 1166.260010 1189.390015 1189.390015 1563900
2019-05-07 1180.469971 1190.439941 1161.040039 1174.099976 1174.099976 1551400
2019-05-08 1172.010010 1180.423950 1165.739990 1166.270020 1166.270020 1309300
2019-05-09 1159.030029 1169.660034 1150.849976 1162.380005 1162.380005 1185700
2019-05-10 1163.589966 1172.599976 1142.500000 1164.270020 1164.270020 1314500
2019-05-13 1141.959961 1147.939941 1122.109985 1132.030029 1132.030029 1860600
2019-05-14 1137.209961 1140.420044 1119.550049 1120.439941 1120.439941 1836600
2019-05-15 1117.869995 1171.329956 1116.666016 1164.209961 1164.209961 2289300
2019-05-16 1164.510010 1188.160034 1162.839966 1178.979980 1178.979980 1531400
2019-05-17 1168.469971 1180.150024 1160.010010 1162.300049 1162.300049 1208600
2019-05-20 1144.500000 1146.796997 1131.442993 1138.849976 1138.849976 1353300
2019-05-21 1148.489990 1152.708008 1137.939941 1149.630005 1149.630005 1159800
2019-05-22 1146.750000 1158.520020 1145.890015 1151.420044 1151.420044 914500
2019-05-23 1140.500000 1145.973022 1129.223999 1140.770020 1140.770020 1198900
2019-05-24 1147.359985 1149.765015 1131.660034 1133.469971 1133.469971 1112000
2019-05-28 1134.000000 1151.587036 1133.119995 1134.150024 1134.150024 1365000
2019-05-29 1127.520020 1129.099976 1108.219971 1116.459961 1116.459961 1538200
2019-05-30 1115.540039 1123.130005 1112.119995 1117.949951 1117.949951 951900
2019-05-31 1101.290039 1109.599976 1100.180054 1103.630005 1103.630005 1507800
2019-06-03 1065.500000 1065.500000 1025.000000 1036.229980 1036.229980 5130600
2019-06-04 1042.900024 1056.050049 1033.689941 1053.050049 1053.050049 2833500
2019-06-05 1051.540039 1053.550049 1030.489990 1042.219971 1042.219971 2168400
2019-06-06 1044.989990 1047.489990 1033.699951 1044.339966 1044.339966 1703200
2019-06-07 1050.630005 1070.920044 1048.400024 1066.040039 1066.040039 1802400
2019-06-10 1072.979980 1092.660034 1072.322021 1080.380005 1080.380005 1464200
2019-06-11 1093.979980 1101.989990 1077.603027 1078.719971 1078.719971 1436700
2019-06-12 1078.000000 1080.930054 1067.540039 1077.030029 1077.030029 1061000
2019-06-13 1083.640015 1094.170044 1080.150024 1088.770020 1088.770020 1057700
2019-06-14 1086.420044 1092.689941 1080.171997 1085.349976 1085.349976 1111500
2019-06-17 1086.280029 1099.180054 1086.280029 1092.500000 1092.500000 941600
2019-06-18 1109.689941 1116.390015 1098.989990 1103.599976 1103.599976 1386700
2019-06-19 1105.599976 1107.000000 1093.479980 1102.329956 1102.329956 1338800
2019-06-20 1119.989990 1120.119995 1104.739990 1111.420044 1111.420044 1262000
2019-06-21 1109.239990 1124.109985 1108.079956 1121.880005 1121.880005 1947600
2019-06-24 1119.609985 1122.000000 1111.010010 1115.520020 1115.520020 1395600
2019-06-25 1112.660034 1114.349976 1083.800049 1086.349976 1086.349976 1546900
2019-06-26 1086.500000 1092.969971 1072.239990 1079.800049 1079.800049 1810900
2019-06-27 1084.000000 1087.099976 1075.290039 1076.010010 1076.010010 1004300
2019-06-28 1076.390015 1081.000000 1073.369995 1080.910034 1080.910034 1693200
2019-07-01 1098.000000 1107.579956 1093.703003 1097.949951 1097.949951 1436300
2019-07-02 1102.239990 1111.770020 1098.170044 1111.250000 1111.250000 991600
2019-07-03 1117.410034 1126.760010 1113.859985 1121.579956 1121.579956 767000
2019-07-05 1117.800049 1132.880005 1116.140015 1131.589966 1131.589966 1264300
2019-07-08 1125.170044 1125.979980 1111.209961 1116.349976 1116.349976 1236400
2019-07-09 1111.800049 1128.025024 1107.170044 1124.829956 1124.829956 1330400
2019-07-10 1131.219971 1142.050049 1130.969971 1140.479980 1140.479980 1209500
2019-07-11 1143.250000 1153.069946 1139.579956 1144.209961 1144.209961 1195500
2019-07-12 1143.989990 1147.339966 1138.780029 1144.900024 1144.900024 864000
2019-07-15 1146.859985 1150.819946 1139.400024 1150.339966 1150.339966 903800
2019-07-16 1146.000000 1158.579956 1145.000000 1153.579956 1153.579956 1238800
2019-07-17 1150.969971 1158.359985 1145.770020 1146.349976 1146.349976 1170000
2019-07-18 1141.739990 1147.604980 1132.729980 1146.329956 1146.329956 1291300
2019-07-19 1148.189941 1151.140015 1129.619995 1130.099976 1130.099976 1647200
2019-07-22 1133.449951 1139.250000 1124.239990 1138.069946 1138.069946 1301500
2019-07-23 1144.000000 1146.900024 1131.800049 1146.209961 1146.209961 1093700
2019-07-24 1131.900024 1144.000000 1126.989990 1137.810059 1137.810059 1589800
2019-07-25 1137.819946 1141.699951 1120.920044 1132.119995 1132.119995 2209800
2019-07-26 1224.040039 1265.550049 1224.000000 1250.410034 1250.410034 4805800
2019-07-29 1241.050049 1247.369995 1228.229980 1239.410034 1239.410034 2223700
2019-07-30 1225.410034 1234.869995 1223.300049 1225.140015 1225.140015 1453300
2019-07-31 1223.000000 1234.000000 1207.764038 1216.680054 1216.680054 1725500
2019-08-01 1214.030029 1234.109985 1205.719971 1209.010010 1209.010010 1698500
2019-08-02 1200.739990 1206.900024 1188.939941 1193.989990 1193.989990 1645100
2019-08-05 1170.040039 1175.239990 1140.140015 1152.319946 1152.319946 2597500
2019-08-06 1163.310059 1179.959961 1160.000000 1169.949951 1169.949951 1709400
2019-08-07 1156.000000 1178.444946 1149.624023 1173.989990 1173.989990 1444300
2019-08-08 1182.829956 1205.010010 1173.020020 1204.800049 1204.800049 1468000
2019-08-09 1197.989990 1203.880005 1183.603027 1188.010010 1188.010010 1065700
2019-08-12 1179.209961 1184.959961 1167.671997 1174.709961 1174.709961 1003000
2019-08-13 1171.459961 1204.780029 1171.459961 1197.270020 1197.270020 1294400
2019-08-14 1176.310059 1182.300049 1160.540039 1164.290039 1164.290039 1578700
2019-08-15 1163.500000 1175.839966 1162.109985 1167.260010 1167.260010 1218700
2019-08-16 1179.550049 1182.719971 1171.810059 1177.599976 1177.599976 1313300
2019-08-19 1190.089966 1206.989990 1190.089966 1198.449951 1198.449951 1231600
2019-08-20 1195.250000 1196.060059 1182.109985 1182.689941 1182.689941 915500
2019-08-21 1193.150024 1199.000000 1187.430054 1191.250000 1191.250000 740700
2019-08-22 1194.069946 1198.011963 1178.579956 1189.530029 1189.530029 947500
2019-08-23 1181.989990 1194.079956 1147.750000 1151.290039 1151.290039 1687000
2019-08-26 1157.260010 1169.469971 1152.959961 1168.890015 1168.890015 1226100
2019-08-27 1180.530029 1182.400024 1161.449951 1167.839966 1167.839966 1077200
2019-08-28 1161.709961 1176.420044 1157.300049 1171.020020 1171.020020 802000
2019-08-29 1181.119995 1196.060059 1181.119995 1192.849976 1192.849976 1088400
2019-08-30 1198.500000 1198.500000 1183.802979 1188.099976 1188.099976 1129800
2019-09-03 1177.030029 1186.890015 1163.199951 1168.390015 1168.390015 1479900
2019-09-04 1176.709961 1183.479980 1171.000000 1181.410034 1181.410034 1068900
2019-09-05 1191.530029 1213.040039 1191.530029 1211.380005 1211.380005 1408100
2019-09-06 1208.130005 1212.015015 1202.521973 1204.930054 1204.930054 1072100
2019-09-09 1204.000000 1220.000000 1192.619995 1204.410034 1204.410034 1471900
2019-09-10 1195.150024 1210.000000 1194.579956 1206.000000 1206.000000 1260100
2019-09-11 1203.410034 1222.599976 1202.199951 1220.170044 1220.170044 1307000
2019-09-12 1224.300049 1241.859985 1223.020020 1234.250000 1234.250000 1725900
2019-09-13 1231.349976 1240.880005 1227.010010 1239.560059 1239.560059 1301400
2019-09-16 1229.520020 1239.560059 1225.609985 1231.300049 1231.300049 1053300
2019-09-17 1230.400024 1235.000000 1223.689941 1229.150024 1229.150024 955100
2019-09-18 1227.510010 1235.609985 1216.530029 1232.410034 1232.410034 1135100
2019-09-19 1232.060059 1244.439941 1232.020020 1238.709961 1238.709961 996000
2019-09-20 1233.119995 1243.319946 1223.079956 1229.930054 1229.930054 2270000
2019-09-23 1226.000000 1239.089966 1224.170044 1234.030029 1234.030029 1062400
2019-09-24 1240.000000 1246.739990 1210.680054 1218.760010 1218.760010 1583200
2019-09-25 1215.819946 1248.300049 1210.089966 1246.520020 1246.520020 1453000
2019-09-26 1241.959961 1245.000000 1232.267944 1241.390015 1241.390015 1538000
2019-09-27 1243.010010 1244.020020 1214.449951 1225.089966 1225.089966 1353900
2019-09-30 1220.969971 1226.000000 1212.300049 1219.000000 1219.000000 1404100
2019-10-01 1219.000000 1231.229980 1203.579956 1205.099976 1205.099976 1273500
2019-10-02 1196.979980 1196.979980 1171.290039 1176.630005 1176.630005 1615100
2019-10-03 1180.000000 1189.060059 1162.430054 1187.829956 1187.829956 1621200
2019-10-04 1191.890015 1211.439941 1189.170044 1209.000000 1209.000000 1162400
2019-10-07 1204.400024 1218.203979 1203.750000 1207.680054 1207.680054 842900
2019-10-08 1197.589966 1206.079956 1189.010010 1189.130005 1189.130005 1039300
2019-10-09 1199.349976 1208.349976 1197.630005 1202.310059 1202.310059 867700
2019-10-10 1198.579956 1215.000000 1197.339966 1208.670044 1208.670044 846600
2019-10-11 1222.209961 1228.390015 1213.739990 1215.449951 1215.449951 1272700
2019-10-14 1212.339966 1226.329956 1211.760010 1217.140015 1217.140015 867500
2019-10-15 1220.400024 1247.329956 1220.400024 1243.010010 1243.010010 1381700
2019-10-16 1241.170044 1254.739990 1238.449951 1243.640015 1243.640015 1094600
2019-10-17 1250.930054 1263.324951 1249.939941 1253.069946 1253.069946 952400
2019-10-18 1253.459961 1258.890015 1241.079956 1245.489990 1245.489990 1352800
2019-10-21 1252.260010 1254.629028 1240.599976 1246.150024 1246.150024 1027200
2019-10-22 1247.849976 1250.599976 1241.380005 1242.800049 1242.800049 1023800
2019-10-23 1242.359985 1259.890015 1242.359985 1259.130005 1259.130005 911500
2019-10-24 1260.900024 1264.000000 1253.714966 1260.989990 1260.989990 1028100
2019-10-25 1251.030029 1269.599976 1250.010010 1265.130005 1265.130005 1213100
2019-10-28 1275.449951 1299.310059 1272.540039 1290.000000 1290.000000 2613200
2019-10-29 1276.229980 1281.589966 1257.212036 1262.619995 1262.619995 1886400
2019-10-30 1252.969971 1269.359985 1252.000000 1261.290039 1261.290039 1408900
2019-10-31 1261.280029 1267.670044 1250.843018 1260.109985 1260.109985 1455700
2019-11-01 1265.000000 1274.619995 1260.500000 1273.739990 1273.739990 1670100
2019-11-04 1276.449951 1294.130005 1276.354980 1291.369995 1291.369995 1501000
2019-11-05 1292.890015 1298.930054 1291.229004 1292.030029 1292.030029 1282700
2019-11-06 1289.459961 1293.729980 1282.500000 1291.800049 1291.800049 1152700
2019-11-07 1294.280029 1323.739990 1294.244995 1308.859985 1308.859985 2030000
2019-11-08 1305.280029 1318.000000 1304.364990 1311.369995 1311.369995 1251400
2019-11-11 1303.180054 1306.425049 1297.410034 1299.189941 1299.189941 1011900
2019-11-12 1300.000000 1310.000000 1295.770020 1298.800049 1298.800049 1085900
2019-11-13 1294.069946 1304.300049 1293.510010 1298.000000 1298.000000 826700
2019-11-14 1297.500000 1317.000000 1295.650024 1311.459961 1311.459961 1193500
2019-11-15 1318.939941 1334.880005 1314.280029 1334.869995 1334.869995 1782600
2019-11-18 1332.219971 1335.529053 1317.500000 1320.699951 1320.699951 1487400
2019-11-19 1327.699951 1327.699951 1312.800049 1315.459961 1315.459961 1269200
2019-11-20 1311.739990 1315.000000 1291.150024 1303.050049 1303.050049 1308600
2019-11-21 1301.479980 1312.589966 1293.000000 1301.349976 1301.349976 995500
2019-11-22 1305.619995 1308.729980 1291.410034 1295.339966 1295.339966 1385700
2019-11-25 1299.180054 1311.310059 1298.130005 1306.689941 1306.689941 1036200
2019-11-26 1309.859985 1314.800049 1305.089966 1313.550049 1313.550049 1069700
2019-11-27 1315.000000 1318.359985 1309.630005 1312.989990 1312.989990 995600
2019-11-29 1307.119995 1310.204956 1303.969971 1304.959961 1304.959961 587000
2019-12-02 1301.000000 1305.829956 1281.000000 1289.920044 1289.920044 1510900
2019-12-03 1279.569946 1298.461060 1279.000000 1295.280029 1295.280029 1143800
2019-12-04 1307.010010 1325.800049 1304.869995 1320.540039 1320.540039 1537500
2019-12-05 1328.000000 1329.358032 1316.439941 1328.130005 1328.130005 1212700
2019-12-06 1333.439941 1344.000000 1333.439941 1340.619995 1340.619995 1314800
2019-12-09 1338.040039 1359.449951 1337.839966 1343.560059 1343.560059 1354300
2019-12-10 1341.500000 1349.974976 1336.040039 1344.660034 1344.660034 1094100
2019-12-11 1350.839966 1351.199951 1342.670044 1345.020020 1345.020020 850400
2019-12-12 1345.939941 1355.775024 1340.500000 1350.270020 1350.270020 1281000
2019-12-13 1347.949951 1353.093018 1343.869995 1347.829956 1347.829956 1549600
2019-12-16 1356.500000 1364.680054 1352.670044 1361.170044 1361.170044 1397300
2019-12-17 1362.890015 1365.000000 1351.322998 1355.119995 1355.119995 1854000
2019-12-18 1356.599976 1360.469971 1351.000000 1352.619995 1352.619995 1522600
2019-12-19 1351.819946 1358.099976 1348.984985 1356.040039 1356.040039 1469900
2019-12-20 1363.349976 1363.640015 1349.000000 1349.589966 1349.589966 3315000
2019-12-23 1355.869995 1359.800049 1346.510010 1348.839966 1348.839966 883100
2019-12-24 1348.500000 1350.260010 1342.780029 1343.560059 1343.560059 347500
2019-12-26 1346.170044 1361.327026 1344.469971 1360.400024 1360.400024 667500
2019-12-27 1362.989990 1364.530029 1349.310059 1351.890015 1351.890015 1038400
2019-12-30 1350.000000 1353.000000 1334.020020 1336.140015 1336.140015 1050900
2019-12-31 1330.109985 1338.000000 1329.084961 1337.020020 1337.020020 961800
2020-01-02 1341.550049 1368.140015 1341.550049 1367.369995 1367.369995 1406600
2020-01-03 1347.859985 1372.500000 1345.543945 1360.660034 1360.660034 1186400
2020-01-06 1350.000000 1396.500000 1350.000000 1394.209961 1394.209961 1732300
2020-01-07 1397.939941 1402.989990 1390.380005 1393.339966 1393.339966 1502700
2020-01-08 1392.079956 1411.579956 1390.839966 1404.319946 1404.319946 1528000
2020-01-09 1420.569946 1427.329956 1410.270020 1419.829956 1419.829956 1500900
2020-01-10 1427.560059 1434.928955 1418.349976 1429.729980 1429.729980 1820700
2020-01-13 1436.130005 1440.520020 1426.020020 1439.229980 1439.229980 1652300
2020-01-14 1439.010010 1441.800049 1428.369995 1430.880005 1430.880005 1558900
2020-01-15 1430.209961 1441.395020 1430.209961 1439.199951 1439.199951 1282700
2020-01-16 1447.439941 1451.989990 1440.920044 1451.699951 1451.699951 1173700
2020-01-17 1462.910034 1481.295044 1458.219971 1480.390015 1480.390015 2396200
2020-01-21 1479.119995 1491.849976 1471.199951 1484.400024 1484.400024 2036700
2020-01-22 1491.000000 1503.213989 1484.930054 1485.949951 1485.949951 1610800
2020-01-23 1487.640015 1495.520020 1482.099976 1486.650024 1486.650024 1351200
2020-01-24 1493.589966 1495.494995 1465.250000 1466.709961 1466.709961 1784600
2020-01-27 1431.000000 1438.069946 1421.199951 1433.900024 1433.900024 1755200
2020-01-28 1443.000000 1456.000000 1432.469971 1452.560059 1452.560059 1577400
2020-01-29 1458.800049 1465.430054 1446.739990 1458.630005 1458.630005 1077700
2020-01-30 1439.959961 1457.280029 1436.400024 1455.839966 1455.839966 1339400
2020-01-31 1468.900024 1470.130005 1428.530029 1434.229980 1434.229980 2417200
2020-02-03 1462.000000 1490.000000 1458.989990 1485.939941 1485.939941 3055200
2020-02-04 1457.069946 1469.500000 1426.300049 1447.069946 1447.069946 3933000
2020-02-05 1462.420044 1463.839966 1430.560059 1448.229980 1448.229980 1986200
2020-02-06 1450.329956 1482.000000 1449.569946 1476.229980 1476.229980 1679400
2020-02-07 1467.300049 1485.839966 1466.349976 1479.229980 1479.229980 1172300
2020-02-10 1474.319946 1509.500000 1474.319946 1508.680054 1508.680054 1419900
2020-02-11 1511.810059 1529.630005 1505.637939 1508.790039 1508.790039 1344600
2020-02-12 1514.479980 1520.694946 1508.109985 1518.270020 1518.270020 1167600
2020-02-13 1512.689941 1527.180054 1504.599976 1514.660034 1514.660034 929500
2020-02-14 1515.599976 1520.739990 1507.339966 1520.739990 1520.739990 1197800
2020-02-18 1515.000000 1531.630005 1512.589966 1519.670044 1519.670044 1120700
2020-02-19 1525.069946 1532.105957 1521.400024 1526.689941 1526.689941 949300
2020-02-20 1522.000000 1529.640015 1506.819946 1518.150024 1518.150024 1096600
2020-02-21 1508.030029 1512.214966 1480.439941 1485.109985 1485.109985 1731700
2020-02-24 1426.109985 1436.969971 1411.390015 1421.589966 1421.589966 2867100
2020-02-25 1433.000000 1438.140015 1382.400024 1388.449951 1388.449951 2478300
2020-02-26 1396.140015 1415.699951 1379.000000 1393.180054 1393.180054 2202400
2020-02-27 1362.060059 1371.703979 1317.170044 1318.089966 1318.089966 2978300
2020-02-28 1277.500000 1341.140015 1271.000000 1339.329956 1339.329956 3790600
2020-03-02 1351.609985 1390.869995 1326.814941 1389.109985 1389.109985 2431500
2020-03-03 1399.420044 1410.150024 1332.000000 1341.390015 1341.390015 2402300
2020-03-04 1359.229980 1388.089966 1343.109985 1386.520020 1386.520020 1913300
2020-03-05 1350.199951 1358.910034 1305.099976 1319.040039 1319.040039 2561300
2020-03-06 1277.060059 1306.219971 1261.050049 1298.410034 1298.410034 2660600
2020-03-09 1205.300049 1254.760010 1200.000000 1215.560059 1215.560059 3365400
2020-03-10 1260.000000 1281.150024 1218.770020 1280.390015 1280.390015 2611400
2020-03-11 1249.699951 1260.959961 1196.069946 1215.410034 1215.410034 2608500
2020-03-12 1126.000000 1193.869995 1113.300049 1114.910034 1114.910034 4226700
2020-03-13 1179.000000 1219.760010 1117.142944 1219.729980 1219.729980 3700100
2020-03-16 1096.000000 1152.266968 1074.439941 1084.329956 1084.329956 4252400
2020-03-17 1093.109985 1130.859985 1056.010010 1119.800049 1119.800049 3861500
2020-03-18 1056.510010 1106.500000 1037.280029 1096.800049 1096.800049 4233400
2020-03-19 1093.050049 1157.969971 1060.108032 1115.290039 1115.290039 3651100
2020-03-20 1135.719971 1143.989990 1065.489990 1072.319946 1072.319946 3601800
2020-03-23 1061.319946 1071.319946 1013.536011 1056.619995 1056.619995 4044100
2020-03-24 1103.770020 1135.000000 1090.619995 1134.459961 1134.459961 3344500
2020-03-25 1126.469971 1148.900024 1086.010010 1102.489990 1102.489990 4081500
2020-03-26 1111.800049 1169.969971 1093.530029 1161.750000 1161.750000 3571700
2020-03-27 1125.670044 1150.670044 1105.910034 1110.709961 1110.709961 3208500
2020-03-30 1125.040039 1151.630005 1096.479980 1146.819946 1146.819946 2574100
2020-03-31 1147.300049 1175.310059 1138.140015 1162.810059 1162.810059 2486400
2020-04-01 1122.000000 1129.689941 1097.449951 1105.619995 1105.619995 2344200
2020-04-02 1098.260010 1126.859985 1096.400024 1120.839966 1120.839966 1964900
2020-04-03 1119.015015 1123.540039 1079.810059 1097.880005 1097.880005 2313400
2020-04-06 1138.000000 1194.660034 1130.939941 1186.920044 1186.920044 2664700
2020-04-07 1221.000000 1225.000000 1182.229980 1186.510010 1186.510010 2387300
2020-04-08 1206.500000 1219.069946 1188.160034 1210.280029 1210.280029 1975100
2020-04-09 1224.079956 1225.569946 1196.734985 1211.449951 1211.449951 2175400
2020-04-13 1209.180054 1220.510010 1187.598022 1217.560059 1217.560059 1739800
2020-04-14 1245.089966 1282.069946 1236.930054 1269.229980 1269.229980 2470400
2020-04-15 1245.609985 1280.459961 1240.400024 1262.469971 1262.469971 1671700
2020-04-16 1274.099976 1279.000000 1242.619995 1263.469971 1263.469971 2518100
2020-04-17 1284.849976 1294.430054 1271.229980 1283.250000 1283.250000 1949000
2020-04-20 1271.000000 1281.599976 1261.369995 1266.609985 1266.609985 1695500
2020-04-21 1247.000000 1254.270020 1209.709961 1216.339966 1216.339966 2153000
2020-04-22 1245.540039 1285.613037 1242.000000 1263.209961 1263.209961 2093100
2020-04-23 1271.550049 1293.310059 1265.670044 1276.310059 1276.310059 1560300
2020-04-24 1261.170044 1280.400024 1249.829956 1279.310059 1279.310059 1595740
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<style>
path {
fill: none;
stroke: steelblue;
stroke-width: 1.5;
stroke-linejoin: round;
stroke-linecap: round;
}
</style>
</head>
<body></body>
<script src="https://d3js.org/d3.v5.min.js"></script>
<script>
(async () => {
// Step 1. Define the dimensions.
const width = 960;
const height = 500;
const margin = {top: 20, right: 20, bottom: 30, left: 40};
// Step 2. Prepare the data.
const data = (await d3.csv('GOOG.csv', d3.autoType))
.map(({Date, Close}) => ({
date: Date,
value: Close,
}));
// Step 3. Create x and y axes.
const xScale = d3.scaleTime()
.domain(d3.extent(data, d => d.date))
.range([margin.left, width - margin.right]);
const yScale = d3.scaleLinear()
.domain([0, d3.max(data, (d) => d.value)]).nice()
.range([height - margin.bottom, margin.top]);
const xAxis = (g) => g
.attr('transform', `translate(0,${height - margin.bottom})`)
.call(d3.axisBottom(xScale));
const yAxis = (g) => g
.attr('transform', `translate(${margin.left},0)`)
.call(d3.axisLeft(yScale));
// Step 4. Define the line function.
const line = d3.line()
.defined(d => !isNaN(d.value))
.x(d => xScale(d.date))
.y(d => yScale(d.value));
// Step 5. Draw the SVG.
// First let's create an empty SVG.
const svg = d3.select('body')
.append('svg')
.attr('width', width)
.attr('height', height);
// Draw the x and y axes.
svg.append('g').call(xAxis)
svg.append('g').call(yAxis)
// Draw the line.
svg.append('path')
.datum(data)
.attr('d', line);
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment