# Path: core/const.py
# class AccountType:
#     """Enum of all possible account types.
# 
#     * ``Asset``
#     * ``Liability``
#     * ``Income``
#     * ``Expense``
# 
#     Special values:
# 
#     * ``All``: set containing all account types
#     * ``InOrder``: all account type in "sort" order.
#     """
#     Asset = 'asset'
#     Liability = 'liability'
#     Income = 'income'
#     Expense = 'expense'
#     InOrder = [Asset, Liability, Income, Expense]
#     All = set(InOrder)


from collections import defaultdict
from core.trans import tr
from ..const import AccountType
from .pie_chart import PieChart
            entries = self.document.accounts.entries_for_account(account)
            balance = entries.normal_balance(date, currency)
            return balance

        return [(a, get_value(a)) for a in accounts]

    def _get_data(self):
        return (
            self._get_data_for_account_type(AccountType.Asset),
            self._get_data_for_account_type(AccountType.Liability)
        )

class CashFlowPieChart(_AccountPieChart):
    def __init__(self, profit_view):
        _AccountPieChart.__init__(self, profit_view, tr('Income & Expenses'))

    # --- Override
    def _get_account_data(self, accounts):
        date_range = self.document.date_range
        currency = self.document.default_currency

        def get_value(account):
            entries = self.document.accounts.entries_for_account(account)
            cash_flow = entries.normal_cash_flow(date_range, currency)
            return cash_flow

        return [(a, get_value(a)) for a in accounts]

    def _get_data(self):
        return (

# Path: core/const.py
# class AccountType:
#     """Enum of all possible account types.
# 
#     * ``Asset``
#     * ``Liability``
#     * ``Income``
#     * ``Expense``
# 
#     Special values:
# 
#     * ``All``: set containing all account types
#     * ``InOrder``: all account type in "sort" order.
#     """
#     Asset = 'asset'
#     Liability = 'liability'
#     Income = 'income'
#     Expense = 'expense'
#     InOrder = [Asset, Liability, Income, Expense]
#     All = set(InOrder)


# Path: core/gui/account_pie_chart.py
from collections import defaultdict
from core.trans import tr
from ..const import AccountType
from .pie_chart import PieChart

            entries = self.document.accounts.entries_for_account(account)
            balance = entries.normal_balance(date, currency)
            return balance

        return [(a, get_value(a)) for a in accounts]

    def _get_data(self):
        return (
            self._get_data_for_account_type(AccountType.Asset),
            self._get_data_for_account_type(AccountType.Liability)
        )

class CashFlowPieChart(_AccountPieChart):
    def __init__(self, profit_view):
        _AccountPieChart.__init__(self, profit_view, tr('Income & Expenses'))

    # --- Override
    def _get_account_data(self, accounts):
        date_range = self.document.date_range
        currency = self.document.default_currency

        def get_value(account):
            entries = self.document.accounts.entries_for_account(account)
            cash_flow = entries.normal_cash_flow(date_range, currency)
            return cash_flow

        return [(a, get_value(a)) for a in accounts]

    def _get_data(self):
        return (

            self._get_data_for_account_type(AccountType.Income),