def METHOD_NAME(filters, columns, income, expense, net_profit_loss):
	labels = [d.get("label") for d in columns[2:]]
	income_data, expense_data, net_profit = [], [], []
	for p in columns[2:]:
		if income:
			income_data.append(income[-2].get(p.get("fieldname")))
		if expense:
			expense_data.append(expense[-2].get(p.get("fieldname")))
		if net_profit_loss:
			net_profit.append(net_profit_loss.get(p.get("fieldname")))
	datasets = []
	if income_data:
		datasets.append({"name": _("Income"), "values": income_data})
	if expense_data:
		datasets.append({"name": _("Expense"), "values": expense_data})
	if net_profit:
		datasets.append({"name": _("Net Profit/Loss"), "values": net_profit})
	chart = {"data": {"labels": labels, "datasets": datasets}}
	if not filters.accumulated_values:
		chart["type"] = "bar"
	else:
		chart["type"] = "line"
	chart["fieldtype"] = "Currency"
	return chart