test-chart.html 1.15 KB
Newer Older
Sascha Herzinger's avatar
misc    
Sascha Herzinger committed
1
2
3
<!doctype html>

<head>
4
  <script src="http://localhost:8080/credentials.js"></script>
Sascha Herzinger's avatar
:fish:    
Sascha Herzinger committed
5
  <script src="http://localhost:8080/fractal.js"></script>
Sascha Herzinger's avatar
misc    
Sascha Herzinger committed
6
7
8
</head>

<body>
9
<div style="height: 100%; width: 70%">
10
11
12
13
  <div id="placeholder1"></div>
</div>
<div style="height: 1200px; width: 1200px">
  <div id="placeholder2"></div>
14
</div>
Sascha Herzinger's avatar
misc    
Sascha Herzinger committed
15
16
17
</body>

<script>
Sascha Herzinger's avatar
Sascha Herzinger committed
18
19
  /* eslint-disable no-undef */

20
21
  const fjs = fractal.init({
    handler: 'ada',
Sascha Herzinger's avatar
Sascha Herzinger committed
22
    thisBaseURL: 'https://ada.parkinson.lu',
23
    fractalisBaseURL: 'http://127.0.0.1:5000',
24
    getAuth () {
25
      return credentials1
26
    }
27
  })
Sascha Herzinger's avatar
Sascha Herzinger committed
28
  fjs.clearCache()
Sascha Herzinger's avatar
Sascha Herzinger committed
29
30
31
32
    .then(() => {
      fjs.loadData([
        {
          data_type: 'Integer',
33
34
          data_set: 'ppmi.clinical_visit',
          projection: 'VITALHTCM',
Sascha Herzinger's avatar
Sascha Herzinger committed
35
36
37
38
39
40
          get label () {
            return `${this.projection} (${this.data_set})`
          }
        },
        {
          data_type: 'Double',
41
42
          data_set: 'ppmi.clinical_visit',
          projection: 'VITALWGTKG',
Sascha Herzinger's avatar
Sascha Herzinger committed
43
44
45
46
47
48
          get label () {
            return `${this.projection} (${this.data_set})`
          }
        }
      ])
    })
49
  fjs.setChart({chart: 'correlation-analysis', selector: '#placeholder1'})
Sascha Herzinger's avatar
Sascha Herzinger committed
50
</script>