Skip to content

Commit cc15d5d

Browse files
fixes
1 parent 4309241 commit cc15d5d

File tree

3 files changed

+26
-58
lines changed

3 files changed

+26
-58
lines changed

advanced_examples/parameters_example/widgets.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,25 @@
7676
"params": [
7777
{
7878
"paramName": "chain",
79-
"description": "Select a chain to get historical TVL",
79+
"description": "Select a chain to get historical TVL11",
8080
"value": "Ethereum",
8181
"label": "Chain",
8282
"type": "endpoint",
83-
"optionsEndpoint": "get_chains_list"
83+
"optionsEndpoint": "get_chains_list",
84+
"style": {
85+
"popupWidth": 950
86+
}
8487
},
8588
{
8689
"paramName": "chain2",
87-
"description": "Select a chain to get historical TVL",
90+
"description": "Select a chain to get historical TVL22",
8891
"value": "Ethereum",
8992
"label": "Chain",
9093
"type": "endpoint",
91-
"optionsEndpoint": "get_chains_list_advanced"
94+
"optionsEndpoint": "get_chains_list_advanced",
95+
"style": {
96+
"popupWidth": 200
97+
}
9298
},
9399
{
94100
"paramName": "tickerPicker",
@@ -99,4 +105,4 @@
99105
}
100106
]
101107
}
102-
}
108+
}

widget_examples/metric_widget/main.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,24 @@ def test_metric():
4141
data = [{
4242
"label": "Example Label",
4343
"value": "12345",
44-
"delta": "5.67"
44+
"delta": "0.01"
4545
},
4646
{
4747
"label": "Example Label 2",
4848
"value": "12345",
49-
"delta": "5.67"
49+
"delta": "-0.01"
5050
},
5151
{
5252
"label": "Example Label 3",
5353
"value": "12345",
5454
"delta": "5.67"
5555
},
5656
{
57+
"label": "Example Label 4",
58+
"value": "12345",
59+
"delta": "0.00"
60+
},
61+
{
5762
"label": "Example Label 4",
5863
"value": "12345"
5964
}
Lines changed: 8 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,13 @@
11
{
2-
"whitepapers": {
3-
"name": "Whitepapers",
4-
"description": "List of available whitepapers",
5-
"category": "Documents",
6-
"endpoint": "/random/whitepapers/view-base64",
2+
"test_metric": {
3+
"name": "Metric Widget",
4+
"description": "A metric widget example",
5+
"category": "Test",
6+
"endpoint": "test_metric",
77
"gridData": {
8-
"w": 40,
9-
"h": 10
8+
"w": 5,
9+
"h": 5
1010
},
11-
"type": "multi_file_viewer",
12-
"params": [
13-
{
14-
"type": "endpoint",
15-
"paramName": "whitepaper",
16-
"value": "http://localhost:3000/random/whitepapers",
17-
"label": "Whitepaper",
18-
"description": "Whitepaper to display.",
19-
"optionsEndpoint": "/random/whitepapers",
20-
"show": false,
21-
"optionsParams": {
22-
"type": "$type"
23-
}
24-
},
25-
{
26-
"type": "text",
27-
"paramName": "type",
28-
"value": "all",
29-
"label": "Type of whitepaper",
30-
"description": "Type of whitepaper to fetch.",
31-
"options": [
32-
{
33-
"label": "All",
34-
"value": "all"
35-
},
36-
{
37-
"label": "L1",
38-
"value": "l1"
39-
},
40-
{
41-
"label": "L2",
42-
"value": "l2"
43-
},
44-
{
45-
"label": "Oracles",
46-
"value": "oracles"
47-
},
48-
{
49-
"label": "Defi",
50-
"value": "defi"
51-
}
52-
]
53-
}
54-
]
11+
"type": "metric"
5512
}
5613
}

0 commit comments

Comments
 (0)