def get_trend_plot(user, *args, **kwargs): data = request.get_json() my_filters = get_filter_from_data(data) data_keys = data.get("fields", {}) plot_data = get_timeline_sample_data(my_filters, data_keys) html = generate_trend_plot(plot_data) return jsonify({'success': True, 'plot': html})
def timeline_sample_data(user, *args, **kwargs): data = request.get_json() my_filters = get_filter_from_data(data) data_keys = data.get("fields", {}) ret_data = get_timeline_sample_data(my_filters, data_keys) return jsonify(ret_data)