MDK Logo

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";
PropStatusTypeDefaultDescription
metricsRequiredEbitdaDisplayMetrics | null
ebitdaChartInputRequiredToBarChartDataInput | null
btcProducedChartInputRequiredToBarChartDataInput | null
hasBtcProducedAllZerosRequiredboolean
showEbitdaBarChartRequiredboolean
currentBTCPriceRequirednumber
datePickerRequiredReact.ReactElement<unknown, string | React.JSXElementConstructor<any>>
isLoadingOptionalboolean | undefined
errorsOptionalstring[] | undefined
hasDateSelectionRequiredbooleanWhen false, show the "select a period" hint instead of empty data.
setCostHrefOptionalstring | undefinedOptional URL for the "Set Monthly Cost" control (hidden when omitted).

Usage

Components for the EBITDA financial reporting section.

ComponentDescription
EbitdaTop-level EBITDA dashboard combining metrics row, charts, and date picker.
EbitdaChartsChart panel visualising revenue, cost, and EBITDA over time.
EbitdaMetricsSummary metric cards row: actual, hodl, selling, and production cost.

Ebitda Props

PropTypeDescription
metricsEbitdaDisplayMetrics | nullComputed EBITDA metrics.
ebitdaChartInputToBarChartDataInput | nullData for the EBITDA bar chart.
btcProducedChartInputToBarChartDataInput | nullData for the BTC produced chart.
hasBtcProducedAllZerosbooleanWhether all BTC produced values are zero.
showEbitdaBarChartbooleanShow the EBITDA bar chart.
currentBTCPricenumberCurrent Bitcoin price in USD.
datePickerReactElementDate picker element.
isLoadingbooleanLoading state.
errorsstring[]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>)