Hello, everybody.
In my project, I want to use interactive offline maps. So far, I’ve found a solution that might be more appropriate, which is to combine Dash and pyecharts, but at present the official website only gives the combination of pyecharts and flask, who can convert the following cases into Dash version?
Looking forward to your enthusiastic reply.
Greatly appreciated!
‘’’
from flask import Flask
from sklearn.externals import joblib
from flask import Flask,render_template,url_for
import pyecharts
server = Flask(__name__)
def render_test_1():
attr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
v1 = [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
v2 = [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
line = pyecharts.Line("Title1", "Title2")
line.add("v1", attr, v1, mark_point=['average'])
line.add("v2", attr, v2, mark_line=['average'], is_smooth=True)
line.render('templates/bar01.html')
@server.route('/')
def do_main():
render_test_1()
return render_template('bar01.html')
if __name__ == '__main__':
server.run(debug=True, port=9993, host="0.0.0.0")