Skip to content

Commit 3969c6b

Browse files
committed
fix: simplify annotated bar chart example
1 parent bd4219e commit 3969c6b

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

demo/examples/ruleMark.ts

+47
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,51 @@
11
export const ruleMark = {
2+
"title": "Tonsil ChIP-seq in Th1 cells",
3+
"subtitle": "Annotated bar chart with lines",
4+
"style": {"dashed": [3, 3]},
5+
"views": [
6+
{
7+
"alignment": "overlay",
8+
"tracks": [
9+
{
10+
"data": {
11+
"url": "https://server.gosling-lang.org/api/v1/tileset_info/?d=cistrome-multivec",
12+
"type": "multivec",
13+
"row": "sample",
14+
"column": "position",
15+
"value": "peak",
16+
"categories": ["Th1"],
17+
"binSize": 4
18+
},
19+
"mark": "bar",
20+
"x": {"field": "start", "type": "genomic"},
21+
"xe": {"field": "end", "type": "genomic"},
22+
"y": {"field": "peak", "type": "quantitative", "domain": [0, 0.003]},
23+
"color": {"value": "lightgray"}
24+
},
25+
{
26+
"data": {
27+
"type": "json",
28+
"values": [
29+
{"c": "chr5", "p": 100000, "v": 0.0004},
30+
{"c": "chr10", "p": 100000, "v": 0.0009}
31+
],
32+
"chromosomeField": "c",
33+
"genomicFields": ["p"]
34+
},
35+
"mark": "rule",
36+
"x": {"field": "p", "type": "genomic"},
37+
"y": {"field": "v", "type": "quantitative", "domain": [0, 0.003]},
38+
"strokeWidth": {"field": "v", "type": "quantitative"},
39+
"color": {"value": "blue"}
40+
}
41+
],
42+
"width": 500,
43+
"height": 200
44+
}
45+
]
46+
}
47+
48+
export const ruleMark4 = {
249
"title": "Rule Mark",
350
"subtitle": "Annotate visualization with horizontal and vertical lines",
451
"style": {"dashed": [3, 3]},

0 commit comments

Comments
 (0)