Embed Code Help

Every chart on BitcoinMiningCalcs can be embedded on any website via a lightweight iframe. This page documents every URL parameter the embed page accepts, with copy-paste examples.

URL Structure

All embeds live at: https://bitcoinminingcalcs.com/embed/<chartId>

Append any combination of the parameters below as a query string, for example ?theme=light&height=500.

Supported Parameters

ParamValuesDefaultDescription
themedark | light | transparentdarkColor scheme for the embed. Use "transparent" to inherit the host page background.
bgdark | light | transparentdarkLegacy alias for theme. Kept for backward compatibility — use theme in new embeds.
heightinteger (px)100vhFixed pixel height for the chart container. Ignored when aspect is set.
widthinteger (px) or percent100%Container width. Accepts "600", "600px", or "80%".
aspectW:H (e.g. 16:9, 4:3, 21:9, 1:1)(unset)When set, the chart fills the parent iframe using CSS aspect-ratio so the embed scales fluidly.
headertrue | falsetrueShow or hide the chart title and site attribution bar at the top of the embed.

Copy-Paste Examples

1. Default dark embed, fixed 400px height
<iframe src="https://bitcoinminingcalcs.com/embed/hashprice" width="100%" height="400" frameborder="0" style="border-radius:8px;" loading="lazy" title="Bitcoin Hashprice"></iframe>
2. Light theme
<iframe src="https://bitcoinminingcalcs.com/embed/hashprice?theme=light" width="100%" height="400" frameborder="0" style="border-radius:8px;" loading="lazy" title="Bitcoin Hashprice"></iframe>
3. Transparent background, no header (inherit host page)
<iframe src="https://bitcoinminingcalcs.com/embed/rainbow-chart?theme=transparent&header=false" width="100%" height="500" frameborder="0" style="background:transparent;border:0;" loading="lazy" title="Bitcoin Rainbow Chart"></iframe>
4. Taller fixed-height embed
<iframe src="https://bitcoinminingcalcs.com/embed/hashrate-difficulty?height=600" width="100%" height="600" frameborder="0" style="border-radius:8px;" loading="lazy" title="Hashrate vs Difficulty"></iframe>
5. Fully responsive 16:9 aspect ratio (recommended for modern layouts)
<div style="position:relative;width:100%;max-width:1200px;aspect-ratio:16/9;margin:0 auto;">
  <iframe src="https://bitcoinminingcalcs.com/embed/hashprice?aspect=16:9" style="position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:8px;" loading="lazy" title="Bitcoin Hashprice"></iframe>
</div>
6. Square, light theme (great for sidebars)
<div style="position:relative;width:100%;max-width:480px;aspect-ratio:1/1;margin:0 auto;">
  <iframe src="https://bitcoinminingcalcs.com/embed/margin?aspect=1:1&theme=light" style="position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:8px;" loading="lazy" title="Margin Compression Index"></iframe>
</div>

Available Chart IDs

rainbow-chartBitcoin Rainbow Chart
hashrate-difficultyHashrate vs Difficulty
difficulty-adjustmentDifficulty Adjustments
difficulty-historyDifficulty History
fee-ratioFee Ratio (Fees vs Subsidy)
hashpriceBitcoin Hashprice
profitabilityHashprice Profitability
efficiencyEfficiency Threshold
lifecycleHardware Lifecycle
marginMargin Compression Index
block-time-scatterBlock Time Scatter
block-time-stressBlock Time Stress Index
block-time-distributionBlock Time Distribution

Tips

  • Use aspect instead of height for responsive layouts — it scales cleanly on mobile.
  • Set theme=transparent and wrap the iframe in your own themed container to fully inherit host styles.
  • Add loading="lazy" to the iframe so it doesn't block your page's initial paint.
  • All embeds are cached at the edge — data refreshes several times per hour without any additional configuration.
  • Prefer the visual picker? Open any chart page and click Share → Get Embed Code to generate a snippet with your options pre-selected.