Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nens/nxt-graph
OBSOLETE: This package is embedded in threedi-server. Lizard 5 graph library using D3.js
https://github.com/nens/nxt-graph
Last synced: 4 days ago
JSON representation
OBSOLETE: This package is embedded in threedi-server. Lizard 5 graph library using D3.js
- Host: GitHub
- URL: https://github.com/nens/nxt-graph
- Owner: nens
- License: gpl-3.0
- Created: 2013-07-15T10:06:22.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-02-24T09:27:35.000Z (over 9 years ago)
- Last Synced: 2024-04-12T01:12:29.317Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.56 MB
- Stars: 0
- Watchers: 33
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE.rst
Awesome Lists containing this project
README
nxt-graph
==========================================Introduction
------------Generic javascript graph library.
Prerequisities
--------------You must use AngularJS in order to use nxt-graph (get it from elsewhere). Also include d3, nv, nxt-graph js and css (embedded in nxt-graph) in your document::
Usage
-----Make directives and modify the infourl from Angular. The nxt-timeseries and nxt-profile will automagically become fancy nv d3 graphs! Even more: every time when the inner url is updated, the graph will refresh itself. This way you can get realtime moving graphs!
Example::
app.controller("InfoPoint", ["$scope", function($scope) {
$scope.$on("infopoint", function(message, content) {
$scope.$apply(function() {
console.log("open box infopoint");
var lonlat = content.point;
var $layer = document.getElementsByClassName("workspace-wms-layer")[0]; // there is only one
$scope.infourl = $layer.dataset['workspaceWmsUrl'].split('/wms')[0] + '/data?' + "REQUEST=gettimeseries&LAYERS=" + content.loaded_model + "&SRS=EPSG:4326&POINT="+lonlat.lng.toString() + ',' + lonlat.lat.toString();
});
});}]);
Timeseries
==========Example::
The url must contain data in the format::
{"timeseries": [["2012-01-01T00:01:00", -0.946], ["2012-01-01T00:02:00", -0.946],
["2012-01-01T00:03:00", -0.946], ["2012-01-01T00:04:00", -0.946],
["2012-01-01T00:05:00", -0.946], ["2012-01-01T00:06:00", -0.946]]}Profiles
========Example::
The url must contain data in the format::
{"depth": [[0.0, 0.2673], [1e-05, 0.2673], [3e-05, 0.2673], [3e-05, 0.2673], [4e-05, 0.2773]],
"waterheight": [[0.0, 0.2673], [1e-05, 0.2673], [3e-05, 0.2673], [3e-05, 0.2673], [4e-05, 0.2773]],
"bathymetry": [[0.0, 0.2673], [1e-05, 0.2673], [3e-05, 0.2673], [3e-05, 0.2673], [4e-05, 0.2773]]}