Ebitda
Top-level EBITDA section of the reporting view — pulls together metric cards, charts, and tables.
Top-level EBITDA section of the reporting view — pulls together metric cards, charts, and tables.
import { Ebitda } from "@tetherto/mdk-react-devkit";| Prop | Status | Type | Default | Description |
|---|---|---|---|---|
metrics | Required | EbitdaDisplayMetrics | null | — | — |
ebitdaChartInput | Required | ToBarChartDataInput | null | — | — |
btcProducedChartInput | Required | ToBarChartDataInput | null | — | — |
hasBtcProducedAllZeros | Required | boolean | — | — |
showEbitdaBarChart | Required | boolean | — | — |
currentBTCPrice | Required | number | — | — |
datePicker | Required | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | — | — |
isLoading | Optional | boolean | undefined | — | — |
errors | Optional | string[] | undefined | — | — |
hasDateSelection | Required | boolean | — | When false, show the "select a period" hint instead of empty data. |
setCostHref | Optional | string | undefined | — | Optional URL for the "Set Monthly Cost" control (hidden when omitted). |
Usage
Components for the EBITDA financial reporting section.
| Component | Description |
|---|---|
Ebitda | Top-level EBITDA dashboard combining metrics row, charts, and date picker. |
EbitdaCharts | Chart panel visualising revenue, cost, and EBITDA over time. |
EbitdaMetrics | Summary metric cards row: actual, hodl, selling, and production cost. |
Ebitda Props
| Prop | Type | Description |
|---|---|---|
metrics | EbitdaDisplayMetrics | null | Computed EBITDA metrics. |
ebitdaChartInput | ToBarChartDataInput | null | Data for the EBITDA bar chart. |
btcProducedChartInput | ToBarChartDataInput | null | Data for the BTC produced chart. |
hasBtcProducedAllZeros | boolean | Whether all BTC produced values are zero. |
showEbitdaBarChart | boolean | Show the EBITDA bar chart. |
currentBTCPrice | number | Current Bitcoin price in USD. |
datePicker | ReactElement | Date picker element. |
isLoading | boolean | Loading state. |
errors | string[] | Error messages to display. |
Examples
import { EbitdaCharts } from '@tetherto/mdk-react-devkit'export const EbitdaChartsExample = () => ( <div className="mdk-example-row"> <EbitdaCharts showEbitdaBarChart={true} ebitdaChartData={{ labels: [], datasets: [] } as never} btcDisplayData={{ labels: [], datasets: [] } as never} isLoading={false} hasBtcProducedAllZeros={false} /> </div>)import { EbitdaMetrics } from '@tetherto/mdk-react-devkit'export const EbitdaMetricsExample = () => ( <div className="mdk-example-row"> <EbitdaMetrics metrics={{ actual: 125000, hodl: 198000, selling: 175000, cost: 50000 } as never} currentBTCPrice={65000} /> </div>)import { Ebitda } from '@tetherto/mdk-react-devkit'export const EbitdaExample = () => ( <div className="mdk-example-row"> <Ebitda metrics={null} ebitdaChartInput={null} btcProducedChartInput={null} hasBtcProducedAllZeros={false} showEbitdaBarChart={true} currentBTCPrice={65000} datePicker={<span>Date picker</span>} hasDateSelection={true} isLoading={false} /> </div>)