flask之pyecharts实时数据更新
我们用falsk来做个小demo 创建app.py 和 templates/index.html and templates/line_on.html 我们先写下前端的 index.html < !DOCTYPE html > < html > < head > < meta charset = "UTF-8" > < title > Awesome - pyecharts < / title > < script src = "https://cdn.bootcss.com/jquery/3.0.0/jquery.min.js" > < / script > < script type = "text/javascript" src = "https://assets.pyecharts.org/assets/echarts.min.js" > < / script > < / head > < body > < div id = "bar" style = "width:500px; height:300px;" > < / div > < script > var chart = echarts . init ( document . getElementById ( 'bar' ) , 'white' , { renderer : 'canvas' } ) ; $ (