forked from predixdesignsystem/px-vis-parallel-coordinates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev_add.html
121 lines (105 loc) · 5.18 KB
/
dev_add.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!--
Copyright (c) 2018, General Electric
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
px-vis-parallel-coordinates Demo</title>
<!-- Requires Webcomponents.js polyfill is provided by the page for browsers that don't support html imports -->
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../px-theme/px-theme-styles.html">
<!-- <link rel="import" href="../px-dark-theme/px-dark-theme-styles.html"> -->
<custom-style>
<style include="px-theme-styles" is="custom-style"></style>
</custom-style>
<!-- Import custom element. Note: see comment about relative paths to dependencies in the *.html file referenced below -->
<link rel="import" href="../promise-polyfill/promise-polyfill-lite.html">
<link rel="import" href="../iron-ajax/iron-ajax.html"/>
<link rel="import" href="../px-vis/px-vis-chart-navigator.html" />
<link rel="import" href="../px-rangepicker/px-rangepicker.html" />
<link rel="import" href="px-vis-parallel-coordinates.html" />
</head>
<!-- <body style="padding:30px; background-color: rgb(27,42,51);"> -->
<body>
<h3>Parallel Coordinates</h3>
<dom-bind>
<template is="dom-bind">
<h3>Parallel Coordinates linked with a rangepicker and navigator</h3>
<div id="bigdiv">
<px-vis-parallel-coordinates
id="parall"
width="1300"
height="500"
chart-data="[[chartData]]"
skip-keys='{"UnitNumber":true,"DLN_MODE":true}'
series-key="TimeStamp"
match-ticks
selected-domain="{{selectedDomain}}"
generate-axes-from-data
tooltip-config='{
"forceDateTimeDisplay": true,
"tooltipStyle": "light"
}'
chart-extents='{"TTXD1_13":["0",20],"TTXD1_12":[-45.96881104,13.16546631],"TTXD1_11":[-33.92840576,7.653076172],"TTXD1_10":[-25.62115479,21.9498291],"TTXD1_17":[-95.79375458,15.96057129],"TTXD1_16":[-95.79375458,8.642944336],"TTXD1_15":[-1049.801758,114.1303101],"TTXD1_14":[-31.18463135,16.30126953],"TTXD1_19":[-6.005004883,16.79980469],"TTXD1_18":[-9.343383789,19.34313965],"TTXD1_26":[-26.74279785,7.468505859],"TTXD1_9":[-95.79375458,7.447998047],"TTXD1_8":[-95.79375458,11.30529785],"TTXD1_7":[-95.79375458,10.87634277],"TTXD1_6":[-95.79375458,13.30334473],"TTXD1_5":[-8.141723633,22.57092285],"TTXD1_4":[-16.99157715,6.598876953],"TTXD1_3":[-21.11291504,16.3963623],"TTXD1_2":[-4.628204346,38.35150146],"TTXD1_1":[-9.776123047,18.99798584],"DWATT":[-8.835100174,216.9765015],"TTXD1_27":[-5.315795898,40.04058838],"TTXD1_24":[-26.83306885,19.48937988],"TTXD1_25":[-58.4041748,1.543830872],"TTXD1_22":[-450.5784302,10.82189941],"TTXD1_23":[-8.329589844,27.51208496],"TTXD1_20":[-2.724113464,24.04833984],"TTXD1_21":[-3.206016541,20.49499512],"TTXD1_28":[-13.21807861,22.13677979],"TTXD1_29":[-14.32019043,14.46655273],"TTXD1_31":[-7.965698242,28.99249268],"TTXD1_30":[-9.743103027,38.30419922]}'
series-config='{
"TTXD1_1":{
"yAxisUnit": "Hz",
"title": "verylongname"
},
"TTXD1_12":{
"yAxisUnit": "F",
"title": "stout"
}
}'
></px-vis-parallel-coordinates>
<iron-ajax
url="../px-demo-data/demo-data/apm/timeseries.json"
handle-as="json"
auto
last-response="{{chartData}}">
</iron-ajax>
</div>
</template>
</dom-bind>
<script>
document.addEventListener('WebComponentsReady', function() {
var chart = document.getElementById('parall'),
rangepicker = document.getElementById('rangepicker'),
btnSnap = document.getElementById('btnSnap'),
parall = document.getElementById('parall'),
navigator = document.getElementById('navigator'),
btn = document.getElementById('btn'),
btnR = document.getElementById('btnR'),
bigdiv = document.getElementById('bigdiv');
// rangepicker.range = {"from":"2016-06-22T15:08:00Z","to":"2016-06-22T20:08:00.000Z"};
var menuConfig = [
{
"name": "Delete",
"eventName": "delete",
"actionContext": parall,
"icon": "px-vis:trash-series",
"action": function(data) {
var newAxes = this.axes;
newAxes.splice(newAxes.indexOf(data.additionalDetail.name),1);
this.set("axes", []);
this.set("axes", newAxes);
}
}
]
parall.set('dynamicMenuConfig', menuConfig);
});
</script>
</body>
</html>