application_2.py 315 B

12345678910
  1. def barchart_data():
  2. if request.method == 'POST':
  3. picked_idx = [request.json['picked_sn'] - 1]
  4. selected_idx = request.json['selected_sn']
  5. selected_idx = [num - 1 for num in selected_idx]
  6. barchart_data = calc_barchart_data(picked_idx, selected_idx)
  7. return barchart_data