Skip to main content
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.
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

hideTable
boolean
default:"false"
When true, hides the P&L table/report section, showing only the chart and summaries.
hideChart
boolean
default:"false"
When true, hides the chart and summary cards, showing only the table.
showDetailedCharts
boolean
Controls whether the detailed revenue/expense breakdown charts are displayed.
stringOverrides
ProfitAndLossViewStringOverrides
Customize text and labels throughout the view.