All fixtures · From the Format page · format/79-chart-calculator.dh.md
Source
---
title: "Chart calculator"
description: A sample of the chart features of format version 11.
---
## Chart calculator
The calculator layout: inputs, one row per formula and one result.
```chart
layout: calculator
title: Storage bill
controls:
- slider: stored
label: Data stored
unit: GB
min: 100
max: 5000
step: 100
value: 1200
- slider: price
label: Price per GB
unit: USD per GB
min: 0.01
max: 0.1
step: 0.001
value: 0.023
- toggle: second
label: Second copy
value: false
let:
storage: "stored * price * (second ? 2 : 1)"
fees: stored / 100
total: storage + fees
calc:
- let: storage
label: Storage
format: money
- let: fees
label: Fees
unit: units
- let: total
label: Monthly bill
format: money
result: true
```
LLM view
---
title: "Chart calculator"
description: A sample of the chart features of format version 11.
source: format/79-chart-calculator.dh.md
---
<!-- Made by dh llm from the source; nobody edits this file. -->
## Chart calculator
The calculator layout: inputs, one row per formula and one result.
Calculator: Storage bill
Inputs:
| Input | Starts at | Can be |
| --- | --- | --- |
| Data stored | 1200 GB | 100 to 5000 GB |
| Price per GB | 0.023 USD per GB | 0.01 to 0.1 USD per GB |
| Second copy | off | on or off |
Formulas, at the start values:
- Storage = Data stored × Price per GB × (Second copy ? 2 : 1) = $27.60
- Fees = Data stored ÷ 100 = 12 units
Result: Monthly bill = Storage + Fees = $39.60Chart calculator
The calculator layout: inputs, one row per formula and one result.
Storage bill
Inputs
GB
USD per GB
How it adds up
Storage$27.60Data stored × Price per GB × (Second copy ? 2 : 1)
Fees12 unitsData stored ÷ 100
Monthly bill$39.60Storage + Fees