PowerModeTimelineChart
Timeline chart for power-mode state changes over time. Wraps @link TimelineChart with mining-specific data shaping.
Timeline chart for power-mode state changes over time. Wraps {@link TimelineChart} with mining-specific data shaping.
import { PowerModeTimelineChart } from "@tetherto/mdk-react-devkit";| Prop | Status | Type | Default | Description |
|---|---|---|---|---|
data | Optional | PowerModeTimelineEntry[] | — | Initial power-mode entries (each with start/end ts + mode). |
dataUpdates | Optional | PowerModeTimelineEntry[] | — | Streaming updates appended to the initial data. |
isLoading | Optional | boolean | — | Show a loading skeleton instead of the chart. |
timezone | Optional | string | — | IANA timezone string for x-axis tick formatting. |
title | Optional | string | — | Chart title. |
Usage
Timeline chart for power-mode state changes over time. Wraps TimelineChart
with mining-specific data shaping.
Data contracts
PowerModeTimelineEntry lives in power-mode-timeline-chart.helper.ts.
Example
/** * Runnable example for PowerModeTimelineChart. */import { PowerModeTimelineChart } from '@tetherto/mdk-react-devkit'const NOW = Date.now() / 1000const HOUR = 60 * 60const mockEntries = [ { ts: NOW - 6 * HOUR, mode: 'normal', id: 'miner-01' }, { ts: NOW - 4 * HOUR, mode: 'boost', id: 'miner-01' }, { ts: NOW - 2 * HOUR, mode: 'normal', id: 'miner-01' },]export const PowerModeTimelineChartExample = () => { return <PowerModeTimelineChart data={mockEntries as never} timezone="UTC" title="Power mode" />}OperationsEnergyChart
Doughnut breakdown of Operations vs Energy cost (in USD totals). Mirrors the OSS `OperationsEnergyCostChart`. Returns the empty-state placeholder when both t…
ProductionCostChart
Production cost over time, overlaid with BTC price. Mirrors the OSS `ProductionCostPriceChart` - both series rendered as bars on the same x-axis (bucket labe…