-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcandlestick_chart.py
30 lines (28 loc) · 935 Bytes
/
candlestick_chart.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
from streamlit_echarts import st_echarts
def candlestick_chart_display (datelist, ohlclist):
option = {
"tooltip": {
"trigger": 'axis'
},
"toolbox": {
"feature": {
"dataZoom": {
"yAxisIndex": "true"
},
"brush": {
"type": ['lineX', 'clear']
}
}
},
"xAxis": {
"data": datelist
},
"yAxis": {"scale": "false"},
"series": [
{
"type": 'candlestick',
"data": ohlclist
}
]
}
return(option)