MDK Logo

EbitdaMetrics

Row of summary metric cards across the top of the EBITDA section (actual, hodl, selling, cost).

Row of summary metric cards across the top of the EBITDA section (actual, hodl, selling, cost).

import { EbitdaMetrics } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
metricsRequiredEbitdaDisplayMetrics
currentBTCPriceRequirednumber

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>)