First of all, just want to say thanks @andfanilo. This package is awesome!
I wonder if anyone could help me with the following? Iāve been trying to implement a gauge chart, but the animation doesnāt seem to work - the gauge just jumps from 0 to the value extremely quickly without animating the rise correctly. The code is as follows:
The chart is within another module echarts_module.py
def gauge(value):
option = {
"tooltip": {
"formatter": '{a} <br/>{b} : {c}%'
},
"series": [
{
"name": 'Current',
"type": 'gauge',
"progress": {
"show": False
},
"axisLine": {
"lineStyle": {
"width": 6,
"color": [
[0.2, 'rgb(235, 34, 14)'],
[0.4, 'rgb(242, 99, 9)'],
[0.6, 'rgb(250, 197, 21)'],
[0.8, 'rgb(117, 198, 5)'],
[1, 'rgb(56, 182, 14)']
]
}
},
"detail": {
"valueAnimation": True,
"formatter": f'{value}%',
"color": 'auto'
},
"data": [
{
"value": value,
"name": '%'
},
]
}
]
}
st_echarts(option, height="400px", key="echarts-1")
which is called as follows in my app.py
#set cols etc
with col1:
value = 55
echarts_module.gauge(value)