All fixtures · From the Format page · format/20-chart-mixed-bars-and-line-two-axes.dh.md
Source
---
title: "Chart: mixed bars and line, two axes"
description: A fixture made from the Format page section of the same name.
---
## Chart: mixed bars and line, two axes
A series can have its own `kind`, and `axis: y2` puts it on a second axis on the right. The chart declares that axis with `y2`.
```chart
kind: bar
title: Runs and time, by number of questions
x: { label: questions, values: [1, 2, 3, 4, 5] }
y: { label: runs }
y2: { label: seconds, min: 0 }
series:
- name: runs
data: [2, 3, 4, 5, 6]
- name: time
kind: line
axis: y2
tone: 5
data: [4, 7, 11, 16, 22]
```
LLM view
---
title: "Chart: mixed bars and line, two axes"
description: A fixture made from the Format page section of the same name.
source: format/20-chart-mixed-bars-and-line-two-axes.dh.md
---
<!-- Made by dh llm from the source; nobody edits this file. -->
## Chart: mixed bars and line, two axes
A series can have its own `kind`, and `axis: y2` puts it on a second axis on the right. The chart declares that axis with `y2`.
Chart (bar + line): Runs and time, by number of questions
Bars: runs. Lines: time. Right axis (y2: seconds): time. Left axis (runs): runs.
| questions | runs | time |
| --- | --- | --- |
| 1 | 2 | 4 |
| 2 | 3 | 7 |
| 3 | 4 | 11 |
| 4 | 5 | 16 |
| 5 | 6 | 22 |Chart: mixed bars and line, two axes
A series can have its own kind, and axis: y2 puts it on a second axis on the right. The chart declares that axis with y2.
Runs and time, by number of questions
Show the numbers as a table
| questions | runs | time |
|---|---|---|
| 1 | 2 | 4 |
| 2 | 3 | 7 |
| 3 | 4 | 11 |
| 4 | 5 | 16 |
| 5 | 6 | 22 |