Created
September 7, 2022 09:48
-
-
Save mapcentia/d5f4d10e63c7def3bb4a22cf33825b9b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<header> | |
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script> | |
<script> | |
let res = {"success":true,"forStore":[{"name":"test","type":"json"}],"forGrid":[{"header":"test","dataIndex":"test","type":"json","typeObj":null}],"type":"FeatureCollection","features":[{"type":"Feature","properties":{"test":{"data":[{"mmsi":"219370000","name":"WIND ENTERPRISE","type":"line","x":["2022-09-06T11:45:06","2022-09-06T12:54:05","2022-09-06T13:45:05","2022-09-06T14:54:05","2022-09-06T15:45:05","2022-09-06T16:48:02","2022-09-06T17:57:05","2022-09-06T18:42:08","2022-09-06T18:54:07","2022-09-06T19:54:03","2022-09-06T20:39:07","2022-09-06T20:48:12","2022-09-06T21:27:08","2022-09-06T21:39:06","2022-09-06T21:48:07","2022-09-06T21:54:08","2022-09-06T21:57:08","2022-09-06T22:00:09","2022-09-06T22:18:07","2022-09-06T22:24:06","2022-09-06T22:54:06","2022-09-06T23:39:03","2022-09-07T00:48:06","2022-09-07T01:12:07","2022-09-07T01:24:06","2022-09-07T01:48:05","2022-09-07T02:48:05","2022-09-07T03:54:06","2022-09-07T04:57:06","2022-09-07T05:54:06","2022-09-07T06:54:04","2022-09-07T07:51:08","2022-09-07T08:48:08"],"y":[0,0,0.1,0.1,0,0,0,0,0.1,0,0,0.1,0,0,0,0,0.1,0.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"size":14,"height":400,"width":700}]}}}],"auth_check":{"success":true,"session":null,"auth_level":null,"checked_relations":["base"]},"peak_memory_usage":"2066 KB","_execution_time":0.341} | |
let obj = res.features[0].properties.test; | |
let data2 = obj ; | |
let layout2 = {height: 400, width: 700, yaxis: {title: 'Speed [kn]'}}; | |
setTimeout(() => { | |
Plotly.newPlot('MyPlaceholder', data2); | |
}, 700); | |
</script> | |
</header> | |
<body> | |
<div id="MyPlaceholder">test</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment