-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsectorchart.py
81 lines (79 loc) · 2.55 KB
/
sectorchart.py
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
from streamlit_echarts import st_echarts
def sector_graph (datelist, banklist, itlist, autolist, medialist, realtylist, consumptionlist, infrastructurallist, pharmalist):
option = {
"title": {
#"text": 'Global Markets Tracker',
#"top": "bottom",
},
"tooltip": {
"trigger": 'axis'
},
"legend": {
"orient": "horizontal",
"top": "top",
"data": ["Bank", "IT", "Auto", "Media", "Realty", "Consumption", "Infra", "Pharma"]
},
"grid": {
"left": '3%',
"right": '4%',
"bottom": '3%',
"containLabel": "true"
},
"toolbox": {
"feature": {
"saveAsImage": {}
}
},
"xAxis": {
"type": 'category',
"boundaryGap": "false",
"data": datelist
},
"yAxis": {
"type": 'value',
"scale": "false"
},
"series": [
{
"name": "Bank",
"type": 'line',
"data": banklist
},
{
"name": "IT",
"type": 'line',
"data": itlist
},
{
"name": "Auto",
"type": 'line',
"data": autolist
},
{
"name": "Media",
"type": 'line',
"data": medialist
},
{
"name": "Realty",
"type": 'line',
"data": realtylist
},
{
"name": "Consumption",
"type": 'line',
"data": consumptionlist
},
{
"name": "Infra",
"type": 'line',
"data": infrastructurallist
},
{
"name": "Pharma",
"type": 'line',
"data": pharmalist
}
]
}
return(option)