-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathSimple.jsx
36 lines (34 loc) · 1010 Bytes
/
Simple.jsx
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
import React from 'react';
import { GoslingComponent } from 'gosling.js';
function SimpleExample() {
return (
<>
<h1 style={{ marginLeft: '60px', marginTop: '60px'}}>Zoom and pan in the track below using your mouse and mouse wheel.</h1>
<GoslingComponent
spec={{
tracks: [{
id: 'heatmap-track',
data: {
url: 'https://server.gosling-lang.org/api/v1/tileset_info/?d=cistrome-multivec',
type: 'multivec',
row: 'sample',
column: 'position',
value: 'peak',
categories: ['sample 1', 'sample 2', 'sample 3', 'sample 4'],
binSize: 4
},
mark: 'rect',
x: { field: 'start', type: 'genomic' },
xe: { field: 'end', type: 'genomic' },
row: { field: 'sample', type: 'nominal', legend: true },
color: { field: 'peak', type: 'quantitative', legend: true, range: 'pink' },
width: 600,
height: 130
}]
}}
experimental={{ reactive: true }}
/>
</>
);
}
export default SimpleExample;