用python的flask框架开发一个web,与前端用ajax进行数据交互,反馈至前端后无法生成图表,请教大神(数据我是打开的本地的一个Excel中的数据)。代码如下:
app = Flask(__name__) @app.route('/', methods=['GET']) def homing(): return render_template('my_shiyan.html') @app.route('/', methods=['POST']) def home(): a=xlrd.open_workbook(r'F:\text\chengjlbb.xlsx') sheet1=a.sheet_by_index(0) cols=sheet1.col_values(0)[1:] cols1=sheet1.col_values(1)[1:] x=request.form.get("luhao", "null") m=[cols1[i] for i in range(