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
| Param | Values | Default | Description |
|---|---|---|---|
| theme | dark | light | transparent | dark | Color scheme for the embed. Use "transparent" to inherit the host page background. |
| bg | dark | light | transparent | dark | Legacy alias for theme. Kept for backward compatibility — use theme in new embeds. |
| height | integer (px) | 100vh | Fixed pixel height for the chart container. Ignored when aspect is set. |
| width | integer (px) or percent | 100% | Container width. Accepts "600", "600px", or "80%". |
| aspect | W: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. |
| header | true | false | true | Show 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 Charthashrate-difficultyHashrate vs Difficultydifficulty-adjustmentDifficulty Adjustmentsdifficulty-historyDifficulty Historyfee-ratioFee Ratio (Fees vs Subsidy)hashpriceBitcoin HashpriceprofitabilityHashprice ProfitabilityefficiencyEfficiency ThresholdlifecycleHardware LifecyclemarginMargin Compression Indexblock-time-scatterBlock Time Scatterblock-time-stressBlock Time Stress Indexblock-time-distributionBlock Time DistributionTips
- Use
aspectinstead ofheightfor responsive layouts — it scales cleanly on mobile. - Set
theme=transparentand 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.