@fusion.dev/helix-docs 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/content/charting.mdx +26 -5
- package/content/intent-reference.mdx +1 -1
- package/content/metrics.mdx +219 -209
- package/content/recipes.mdx +11 -0
- package/content/visual-axes.mdx +1 -1
- package/dist/sources.generated.js +258 -216
- package/package.json +2 -2
package/content/charting.mdx
CHANGED
|
@@ -6,9 +6,30 @@ title: Charting
|
|
|
6
6
|
|
|
7
7
|
# Charting
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
`
|
|
11
|
-
|
|
9
|
+
The chart families are `Bar Chart`, `Line Chart`, `Area Chart`,
|
|
10
|
+
`Scatter Chart`, `Donut Chart`, `Heatmap`, `Sparkline`, `Trend` and the shared
|
|
11
|
+
`Legend`. Each has its own API page. Here is which one answers which question,
|
|
12
|
+
and how the data gets in, which is the same for all of them.
|
|
13
|
+
|
|
14
|
+
## Which chart
|
|
15
|
+
|
|
16
|
+
Pick by the question, not by the picture.
|
|
17
|
+
|
|
18
|
+
- **How much, compared.** `Bar Chart`. A bar's length is its value, so it always
|
|
19
|
+
starts at zero.
|
|
20
|
+
- **How something moved over time.** `Line Chart`. It measures from the data's
|
|
21
|
+
own range, so a small change still shows. Its `area` puts a light wash under
|
|
22
|
+
each line, each drawn from the floor on its own and overlapping the others.
|
|
23
|
+
- **How a total is made up over time.** `Area Chart`. Each column is stacked on
|
|
24
|
+
the one below, so the top edge is the total and a band's thickness is its
|
|
25
|
+
share. This is the one to reach for when the parts add up to something, and
|
|
26
|
+
`Line Chart` with `area` is not a substitute: that overlaps the series, this
|
|
27
|
+
adds them.
|
|
28
|
+
- **Parts of one whole, at one moment.** `Donut Chart`.
|
|
29
|
+
- **Whether two measures relate.** `Scatter Chart`, one point per row.
|
|
30
|
+
- **How each day or check went.** `Heatmap`: uptime, contributions, activity.
|
|
31
|
+
- **The shape of a series beside its number.** `Sparkline`, with no axes. And
|
|
32
|
+
`Trend` for which way one measurement moved and whether that is good news.
|
|
12
33
|
|
|
13
34
|
## The data is a table in the document
|
|
14
35
|
|
|
@@ -84,6 +105,6 @@ Charts animate on entry and on data change, and every one of them answers
|
|
|
84
105
|
## What these are not
|
|
85
106
|
|
|
86
107
|
**Not a charting library.** There is no axis configuration language, no plugin
|
|
87
|
-
system, and no chart type you build by composing scales.
|
|
88
|
-
|
|
108
|
+
system, and no chart type you build by composing scales. Drawings that read a
|
|
109
|
+
table, styled by the token system, with an accessible representation by
|
|
89
110
|
construction. When you need a grammar of graphics, use one.
|
|
@@ -24,7 +24,7 @@ a valid theme.
|
|
|
24
24
|
| Field | Decides |
|
|
25
25
|
|---|---|
|
|
26
26
|
| `brand` | The one color most consumers care about. Required |
|
|
27
|
-
| `accent` | The second emphasis.
|
|
27
|
+
| `accent` | The second emphasis. Unnamed, it is the brand; `{ from: 'brand', rotate: 180 }` asks for the complement |
|
|
28
28
|
| `neutral` | The gray ramp, which can be tinted toward the brand |
|
|
29
29
|
| `status` | `info`, `success`, `warning`, `danger`. A color pins one; an object nudges its hue within the meaning it already carries |
|
|
30
30
|
| `chroma` | How saturated the palette is, independent of hue |
|