> ## Documentation Index
> Fetch the complete documentation index at: https://docs.layerfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Profit and Loss View

> Combined Profit and Loss view with chart, summaries, and table.

The ProfitAndLossView component provides a complete Profit and Loss experience in a single component. It combines the P\&L chart with summaries, a month picker, and the tabular report. It also includes a sidebar panel for detailed revenue/expense breakdowns.

```tsx theme={null}
import { ProfitAndLossView } from '@layerfi/components'

<ProfitAndLossView />

{/* Hide the chart, only show the table */}
<ProfitAndLossView hideChart />

{/* Hide the table, only show the chart */}
<ProfitAndLossView hideTable />

{/* With string overrides */}
<ProfitAndLossView
  stringOverrides={{
    profitAndLossTable: {
      grossProfitLabel: 'Gross Income',
    },
  }}
/>
```

### Properties

<ParamField body="hideTable" type="boolean" default="false">
  When `true`, hides the P\&L table/report section, showing only the chart and summaries.
</ParamField>

<ParamField body="hideChart" type="boolean" default="false">
  When `true`, hides the chart and summary cards, showing only the table.
</ParamField>

<ParamField body="showDetailedCharts" type="boolean">
  Controls whether the detailed revenue/expense breakdown charts are displayed.
</ParamField>

<ParamField body="stringOverrides" type="ProfitAndLossViewStringOverrides">
  Customize text and labels throughout the view.

  <Expandable title="ProfitAndLossViewStringOverrides properties">
    <ParamField body="header" type="string">
      Override the section header text. Defaults to `'Profit & Loss'`.
    </ParamField>

    <ParamField body="profitAndLossTable" type="ProfitAndLossTableStringOverrides">
      String overrides for the P\&L table.

      <Expandable title="ProfitAndLossTableStringOverrides properties">
        <ParamField body="grossProfitLabel" type="string">
          Label for the "Gross Profit" row.
        </ParamField>

        <ParamField body="profitBeforeTaxesLabel" type="string">
          Label for the "Profit before taxes" row.
        </ParamField>

        <ParamField body="netProfitLabel" type="string">
          Label for the "Net Profit" row.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="profitAndLossSummaries" type="ProfitAndLossSummariesStringOverrides">
      String overrides for the summary cards.

      <Expandable title="ProfitAndLossSummariesStringOverrides properties">
        <ParamField body="revenueLabel" type="string">
          Label for the revenue summary card.
        </ParamField>

        <ParamField body="expensesLabel" type="string">
          Label for the expenses summary card.
        </ParamField>

        <ParamField body="netProfitLabel" type="string">
          Label for the net profit summary card.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="profitAndLossDetailedCharts" type="ProfitAndLossDetailedChartsStringOverrides">
      String overrides for the detailed breakdown charts sidebar.

      <Expandable title="ProfitAndLossDetailedChartsStringOverrides properties">
        <ParamField body="detailedChartStringOverrides" type="DetailedChartStringOverrides">
          <Expandable title="DetailedChartStringOverrides properties">
            <ParamField body="expenseChartHeader" type="string">Header for the expenses chart.</ParamField>
            <ParamField body="revenueChartHeader" type="string">Header for the revenue chart.</ParamField>
            <ParamField body="revenueToggleLabel" type="string">Label for the revenue toggle.</ParamField>
            <ParamField body="expenseToggleLabel" type="string">Label for the expense toggle.</ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="detailedTableStringOverrides" type="DetailedTableStringOverrides">
          <Expandable title="DetailedTableStringOverrides properties">
            <ParamField body="categoryColumnHeader" type="string">Column header for categories.</ParamField>
            <ParamField body="typeColumnHeader" type="string">Column header for account type.</ParamField>
            <ParamField body="valueColumnHeader" type="string">Column header for values.</ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>
