<script type="text/javascript">
<script type="text/javascript">
setInterval(function () {
this.myChart = echarts.init(document.querySelector('#main'))
var date = new Date();
var second = date.getSeconds();
var minute = date.getMinutes() + second / 60;
var hour = (date.getHours() % 12) + minute / 60;
this.animationDurationUpdate = 300;
this.myChart.setOption({
series: [
{
name: 'hour',
animation: hour !== 0,
data: [{ value: hour }]
},
{
name: 'minute',
animation: minute !== 0,
data: [{ value: minute }]
},
{
animation: second !== 0,
name: 'second',
data: [{ value: second }]
}
]
});
}, 1000);