-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #306 from proteus-h2020/development
Release 0.0.27
- Loading branch information
Showing
75 changed files
with
2,890 additions
and
214 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare module '*.svg'; |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<!doctype html> | ||
<!--[if lt IE 7]> <html class='no-js lt-ie9 lt-ie8 lt-ie7' lang=''> <![endif]--> | ||
<!--[if IE 7]> <html class='no-js lt-ie9 lt-ie8' lang=''> <![endif]--> | ||
<!--[if IE 8]> <html class='no-js lt-ie9' lang=''> <![endif]--> | ||
<!--[if gt IE 8]><!--> | ||
<html class='no-js' lang=''> | ||
<!--<![endif]--> | ||
|
||
<head> | ||
<title>Simple ConfidenceLinechart</title> | ||
<script src='../node_modules/d3/build/d3.min.js'></script> | ||
<script src='../dist/proteic.js'></script> | ||
<link rel="stylesheet" href="../dist/proteic.css"> | ||
</head> | ||
|
||
<body> | ||
<div id='chart'></div> | ||
<div id='chart-temporal'></div> | ||
|
||
<script> | ||
var dataArea = [ | ||
{key:'serie1', x:1, y:5, error:1}, | ||
{key:'serie1', x:2, y:15, error:1}, | ||
{key:'serie1', x:3, y:35, error:1}, | ||
{key:'serie1', x:4, y:25, error:1}, | ||
{key:'serie1', x:5, y:12, error:1}, | ||
{key:'serie1', x:6, y:0, error:1}, | ||
{key:'serie1', x:7, y:21, error:1}, | ||
{key:'serie1', x:8, y:0, error:1}, | ||
{key:'serie2', x:1, y:4, error:1}, | ||
{key:'serie2', x:2, y:4, error:1}, | ||
{key:'serie2', x:3, y:20, error:1}, | ||
{key:'serie2', x:7, y:12, error:1}, | ||
{key:'serie2', x:5, y:14, error:1}, | ||
{key:'serie2', x:6, y:9, error:1}, | ||
{key:'serie2', x:4, y:12, error:1}, | ||
{key:'serie2', x:8, y:13, error:1} | ||
]; | ||
confidenceLinechart = new proteic.Linechart(dataArea, { | ||
confidenceBandOpacity: 0.7, | ||
selector: '#chart', | ||
markerSize:10, | ||
markerShape: 'dot', | ||
width: '90%', | ||
height: 400, | ||
onClick: (d) => console.log('clicking', d), | ||
onUp: (d) => console.log('upping', d), | ||
onHover: (d) => console.log('hovering', d), | ||
onDown: (d) => console.log('downing', d), | ||
onLeave: (d) => console.log('leaving', d), | ||
confidenceModifier: (confidence) => 2 * confidence | ||
}).annotations([ | ||
{ type: 'threshold', axis: 'y', value: 15.2, text: 'Everything is fine below this line' }, | ||
{ type: 'threshold', axis: 'y', value: 6.8, text: 'We\'re on trouble over this line' }, | ||
{ type: 'threshold', axis: 'x', value: 3.1, text: 'Something could happen at this point' } | ||
]); | ||
confidenceLinechart.draw(); | ||
|
||
var temporalData = [ | ||
{key:'serie1', x: '01/01/16', y: 3, error: 0.5}, | ||
{key:'serie1', x: '01/02/16', y: 5, error: 0.5}, | ||
{key:'serie1', x: '01/03/16', y: 3, error: 0.5}, | ||
{key:'serie1', x: '01/04/16', y: 8, error: 0.5}, | ||
{key:'serie1', x: '01/04/16', y: 3, error: 0.5}, | ||
{key:'serie1', x: '01/05/16', y: 5, error: 0.5}, | ||
{key:'serie1', x: '01/06/16', y: 3, error: 0.5}, | ||
{key:'serie1', x: '01/07/16', y: 8, error: 0.5}, | ||
{key:'serie1', x: '01/08/16', y: 3, error: 0.5}, | ||
{key:'serie1', x: '01/09/16', y: 5, error: 0.5}, | ||
{key:'serie1', x: '01/10/16', y: 3, error: 0.5}, | ||
{key:'serie1', x: '01/11/16', y: 8, error: 0.5}, | ||
{key:'serie1', x: '01/12/16', y: 3, error: 0.5}, | ||
{key:'serie1', x: '01/13/16', y: 5, error: 0.5}, | ||
{key:'serie1', x: '01/14/16', y: 3, error: 0.5}, | ||
{key:'serie1', x: '01/15/16', y: 8, error: 0.5}, | ||
{key:'serie1', x: '01/19/16', y: 5, error: 0.5}, //unsorted!!!! | ||
{key:'serie1', x: '01/16/16', y: 3, error: 0.5}, | ||
{key:'serie1', x: '01/17/16', y: 8, error: 0.5}, | ||
{key:'serie1', x: '01/18/16', y: 3, error: 0.5}, | ||
{key:'serie1', x: '01/20/16', y: 3, error: 0.5} | ||
]; | ||
temporalLinechart = new proteic.Linechart(temporalData, { | ||
confidenceBandOpacity: 0.7, | ||
areaOpacity: 0.3, | ||
xAxisType: 'time', | ||
xAxisFormat: '%m/%d/%y', | ||
selector: '#chart-temporal', | ||
width: '90%', | ||
markerSize: 0, // No markers, | ||
xAxisLabel: 'Numbers', | ||
yAxisLabel: 'Y Axis', | ||
}); | ||
temporalLinechart.draw(); | ||
|
||
</script> | ||
</body> | ||
|
||
</html> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<!doctype html> | ||
<!--[if lt IE 7]> <html class='no-js lt-ie9 lt-ie8 lt-ie7' lang=''> <![endif]--> | ||
<!--[if IE 7]> <html class='no-js lt-ie9 lt-ie8' lang=''> <![endif]--> | ||
<!--[if IE 8]> <html class='no-js lt-ie9' lang=''> <![endif]--> | ||
<!--[if gt IE 8]><!--> | ||
<html class='no-js' lang=''> | ||
<!--<![endif]--> | ||
|
||
<head> | ||
|
||
<head> | ||
<title>Dynamic Confidence Band</title> | ||
<script src='../node_modules/d3/build/d3.min.js'></script> | ||
<script src='../dist/proteic.js'></script> | ||
<meta charset="utf-8" /> | ||
|
||
<link rel="stylesheet" href="../dist/proteic.css"> | ||
</head> | ||
|
||
<body> | ||
<div id='chart'></div> | ||
<script> | ||
let margins = { | ||
top: 20, | ||
left: 70, | ||
bottom: 100, | ||
right: 20 | ||
}; | ||
var ws = new WebSocket('wss://proteicws.herokuapp.com/rain'); | ||
var ds = new proteic.WebsocketDatasource(ws); | ||
linechart = new proteic.Linechart([], { | ||
height: 200, | ||
width: '100%', | ||
legendPosition: 'bottom', | ||
marginTop: margins.top, | ||
marginRight: margins.right + 100, | ||
marginBottom: margins.bottom, | ||
marginLeft: margins.left, | ||
yAxisLabel: 'Amount', | ||
xTicksTextRotation: -65, | ||
propertyX: 'time', | ||
propertyY: 'value', | ||
propertyKey: 'key', | ||
xAxisType: 'time', | ||
xAxisFormat: '%Y-%m-%d %H:%M:%S', | ||
maxNumberOfElements: 5855, | ||
colorScale: proteic.Colors.category7(), | ||
confidenceBandOpacity: 0.3, | ||
confidenceModifier: (confidence) => 0.1 * confidence, | ||
propertyError: 'flowError', | ||
}) | ||
.unpivot(['rain', 'flow']) | ||
.datasource(ds); | ||
ds.start(); | ||
</script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.