def METHOD_NAME(mode_of_payments, data):
	if data:
		values = []
		labels = []
		for mode in mode_of_payments:
			values.append(data[mode])
			labels.append([mode])
		chart = {
			"data": {"labels": labels, "datasets": [{"name": "Mode Of Payments", "values": values}]}
		}
		chart["type"] = "bar"
		return chart