blockcharts alpha

Gallery / Trends over time /

Log scale

Values over several orders of magnitude; growth rates of series of very different size.

86.5 KB of code · core 32.5 + 13 blocks 54.0

Monthly active users of three products

Atlas grows fastest although it is still the smallest: on this scale steady growth is a straight line, and the steeper the line, the faster the growth.

How it is made: On a log scale (scale.log) equal ratios are equal steps, so steady growth is a straight line and its slope is the growth rate: Atlas grows fastest although it is still the smallest. On a linear scale the two small products would lie flat on the bottom.

Revenue and headcount of twelve companies

Revenue rises with headcount, from 3 employees and $210K to 18,000 employees and $4.6B.

How it is made: Both axes are logarithmic: from 3 to 18,000 employees and from $210K to $4.6B of revenue, every company has room. The axis format writes the ticks as currency; without it they are compact (1K, 1M).

What the report is made of

The composer reads the JSON below and puts into the page the core and only the blocks its charts use: 13 of the 59, 86.5 KB of code, minified, which is 40% of the 215.9 KB that the core and every block weigh together. A block that two charts use is carried once. The report file is 95.5 KB: that code, the data, the styles and the page around them.

BlockWhat it doesShare of the codeKB
core.composed
A report with compressed data: the composer has run the checks already.
A report with compressed data: the composer has run the checks already. 32.5
lib.curve
The path of a line: straight segments, a smooth curve that never overshoots, or steps. Shared by line and area.
The path of a line: straight segments, a smooth curve that never overshoots, or steps. Shared by line and area. 1.2
lib.pointer
Where the pointer is on the chart, and following a mouse or a finger once a frame. Shared by tooltip, crosshair, zoom and brush.
Where the pointer is on the chart, and following a mouse or a finger once a frame. Shared by tooltip, crosshair, zoom and brush. 1.7
scale.color
A color per category, from the theme palette.
A color per category, from the theme palette. 0.8
scale.log
Numbers across orders of magnitude; steady growth is a straight line.
Numbers across orders of magnitude; steady growth is a straight line. 2.1
scale.time
Dates to positions, ticks in days, months or years (UTC).
Dates to positions, ticks in days, months or years (UTC). 4.1
mark.line
A line per series, with optional end labels.
A line per series, with optional end labels. 4.4
mark.point
Dots, bubbles and beeswarms.
Dots, bubbles and beeswarms. 3.9
guide.axis
Axes: formatted labels, a title, long categories wrapped.
Axes: formatted labels, a title, long categories wrapped. 11.7
guide.grid
Grid lines at the ticks.
Grid lines at the ticks. 0.6
guide.legend
Legends: categories, a color bar, bubble sizes.
Legends: categories, a color bar, bubble sizes. 6.0
interaction.legend-filter
Click a legend item to hide or show its series.
Click a legend item to hide or show its series. 3.0
interaction.tooltip
The values under the pointer.
The values under the pointer. 10.7
renderer.svg
Draws into SVG: sharp, selectable, prints well. The default.
Draws into SVG: sharp, selectable, prints well. The default. 3.9
TotalThe core 32.5 and 13 blocks 54.086.5

The JSON

This is the whole input. data holds the datasets, each chart is a spec that names one. In a checkout of the repository: node scripts/compose.js skills/blockcharts/recipes/log-scale.json report.html. Saved as page.json, it composes the same with the skill's own runtime/compose.js.

log-scale.json

{
  "title": "Log scale",
  "data": {
    "mau": [
      {
        "month": "2022-01-01",
        "product": "Atlas",
        "users": 1200
      },
      {
        "month": "2022-02-01",
        "product": "Atlas",
        "users": 1315
      },
      {
        "month": "2022-03-01",
        "product": "Atlas",
        "users": 1552
      },
      {
        "month": "2022-04-01",
        "product": "Atlas",
        "users": 1856
      },
      {
        "month": "2022-05-01",
        "product": "Atlas",
        "users": 2104
      },
      {
        "month": "2022-06-01",
        "product": "Atlas",
        "users": 2484
      },
      {
        "month": "2022-07-01",
        "product": "Atlas",
        "users": 2753
      },
      {
        "month": "2022-08-01",
        "product": "Atlas",
        "users": 3100
      },
      {
        "month": "2022-09-01",
        "product": "Atlas",
        "users": 3554
      },
      {
        "month": "2022-10-01",
        "product": "Atlas",
        "users": 4076
      },
      {
        "month": "2022-11-01",
        "product": "Atlas",
        "users": 4818
      },
      {
        "month": "2022-12-01",
        "product": "Atlas",
        "users": 5847
      },
      {
        "month": "2023-01-01",
        "product": "Atlas",
        "users": 6855
      },
      {
        "month": "2023-02-01",
        "product": "Atlas",
        "users": 7649
      },
      {
        "month": "2023-03-01",
        "product": "Atlas",
        "users": 8552
      },
      {
        "month": "2023-04-01",
        "product": "Atlas",
        "users": 9666
      },
      {
        "month": "2023-05-01",
        "product": "Atlas",
        "users": 11396
      },
      {
        "month": "2023-06-01",
        "product": "Atlas",
        "users": 13009
      },
      {
        "month": "2023-07-01",
        "product": "Atlas",
        "users": 14322
      },
      {
        "month": "2023-08-01",
        "product": "Atlas",
        "users": 17378
      },
      {
        "month": "2023-09-01",
        "product": "Atlas",
        "users": 19790
      },
      {
        "month": "2023-10-01",
        "product": "Atlas",
        "users": 21912
      },
      {
        "month": "2023-11-01",
        "product": "Atlas",
        "users": 25232
      },
      {
        "month": "2023-12-01",
        "product": "Atlas",
        "users": 30706
      },
      {
        "month": "2024-01-01",
        "product": "Atlas",
        "users": 36217
      },
      {
        "month": "2024-02-01",
        "product": "Atlas",
        "users": 40764
      },
      {
        "month": "2024-03-01",
        "product": "Atlas",
        "users": 47988
      },
      {
        "month": "2024-04-01",
        "product": "Atlas",
        "users": 55420
      },
      {
        "month": "2024-05-01",
        "product": "Atlas",
        "users": 62653
      },
      {
        "month": "2024-06-01",
        "product": "Atlas",
        "users": 69309
      },
      {
        "month": "2024-07-01",
        "product": "Atlas",
        "users": 80451
      },
      {
        "month": "2024-08-01",
        "product": "Atlas",
        "users": 93855
      },
      {
        "month": "2024-09-01",
        "product": "Atlas",
        "users": 112607
      },
      {
        "month": "2024-10-01",
        "product": "Atlas",
        "users": 127919
      },
      {
        "month": "2024-11-01",
        "product": "Atlas",
        "users": 144085
      },
      {
        "month": "2024-12-01",
        "product": "Atlas",
        "users": 170465
      },
      {
        "month": "2022-01-01",
        "product": "Beacon",
        "users": 40000
      },
      {
        "month": "2022-02-01",
        "product": "Beacon",
        "users": 41753
      },
      {
        "month": "2022-03-01",
        "product": "Beacon",
        "users": 44824
      },
      {
        "month": "2022-04-01",
        "product": "Beacon",
        "users": 48493
      },
      {
        "month": "2022-05-01",
        "product": "Beacon",
        "users": 52163
      },
      {
        "month": "2022-06-01",
        "product": "Beacon",
        "users": 54629
      },
      {
        "month": "2022-07-01",
        "product": "Beacon",
        "users": 58989
      },
      {
        "month": "2022-08-01",
        "product": "Beacon",
        "users": 62850
      },
      {
        "month": "2022-09-01",
        "product": "Beacon",
        "users": 67425
      },
      {
        "month": "2022-10-01",
        "product": "Beacon",
        "users": 70686
      },
      {
        "month": "2022-11-01",
        "product": "Beacon",
        "users": 74464
      },
      {
        "month": "2022-12-01",
        "product": "Beacon",
        "users": 77710
      },
      {
        "month": "2023-01-01",
        "product": "Beacon",
        "users": 82088
      },
      {
        "month": "2023-02-01",
        "product": "Beacon",
        "users": 86475
      },
      {
        "month": "2023-03-01",
        "product": "Beacon",
        "users": 90344
      },
      {
        "month": "2023-04-01",
        "product": "Beacon",
        "users": 97206
      },
      {
        "month": "2023-05-01",
        "product": "Beacon",
        "users": 102519
      },
      {
        "month": "2023-06-01",
        "product": "Beacon",
        "users": 107139
      },
      {
        "month": "2023-07-01",
        "product": "Beacon",
        "users": 112923
      },
      {
        "month": "2023-08-01",
        "product": "Beacon",
        "users": 121304
      },
      {
        "month": "2023-09-01",
        "product": "Beacon",
        "users": 130519
      },
      {
        "month": "2023-10-01",
        "product": "Beacon",
        "users": 137927
      },
      {
        "month": "2023-11-01",
        "product": "Beacon",
        "users": 146125
      },
      {
        "month": "2023-12-01",
        "product": "Beacon",
        "users": 155216
      },
      {
        "month": "2024-01-01",
        "product": "Beacon",
        "users": 163060
      },
      {
        "month": "2024-02-01",
        "product": "Beacon",
        "users": 173025
      },
      {
        "month": "2024-03-01",
        "product": "Beacon",
        "users": 183595
      },
      {
        "month": "2024-04-01",
        "product": "Beacon",
        "users": 195328
      },
      {
        "month": "2024-05-01",
        "product": "Beacon",
        "users": 207940
      },
      {
        "month": "2024-06-01",
        "product": "Beacon",
        "users": 224741
      },
      {
        "month": "2024-07-01",
        "product": "Beacon",
        "users": 237900
      },
      {
        "month": "2024-08-01",
        "product": "Beacon",
        "users": 250241
      },
      {
        "month": "2024-09-01",
        "product": "Beacon",
        "users": 264699
      },
      {
        "month": "2024-10-01",
        "product": "Beacon",
        "users": 283615
      },
      {
        "month": "2024-11-01",
        "product": "Beacon",
        "users": 298845
      },
      {
        "month": "2024-12-01",
        "product": "Beacon",
        "users": 316827
      },
      {
        "month": "2022-01-01",
        "product": "Cirrus",
        "users": 900000
      },
      {
        "month": "2022-02-01",
        "product": "Cirrus",
        "users": 912262
      },
      {
        "month": "2022-03-01",
        "product": "Cirrus",
        "users": 926703
      },
      {
        "month": "2022-04-01",
        "product": "Cirrus",
        "users": 942257
      },
      {
        "month": "2022-05-01",
        "product": "Cirrus",
        "users": 954381
      },
      {
        "month": "2022-06-01",
        "product": "Cirrus",
        "users": 971043
      },
      {
        "month": "2022-07-01",
        "product": "Cirrus",
        "users": 982701
      },
      {
        "month": "2022-08-01",
        "product": "Cirrus",
        "users": 1001068
      },
      {
        "month": "2022-09-01",
        "product": "Cirrus",
        "users": 1020301
      },
      {
        "month": "2022-10-01",
        "product": "Cirrus",
        "users": 1031187
      },
      {
        "month": "2022-11-01",
        "product": "Cirrus",
        "users": 1048224
      },
      {
        "month": "2022-12-01",
        "product": "Cirrus",
        "users": 1058656
      },
      {
        "month": "2023-01-01",
        "product": "Cirrus",
        "users": 1073802
      },
      {
        "month": "2023-02-01",
        "product": "Cirrus",
        "users": 1087864
      },
      {
        "month": "2023-03-01",
        "product": "Cirrus",
        "users": 1099583
      },
      {
        "month": "2023-04-01",
        "product": "Cirrus",
        "users": 1118466
      },
      {
        "month": "2023-05-01",
        "product": "Cirrus",
        "users": 1136949
      },
      {
        "month": "2023-06-01",
        "product": "Cirrus",
        "users": 1160788
      },
      {
        "month": "2023-07-01",
        "product": "Cirrus",
        "users": 1177404
      },
      {
        "month": "2023-08-01",
        "product": "Cirrus",
        "users": 1190345
      },
      {
        "month": "2023-09-01",
        "product": "Cirrus",
        "users": 1208652
      },
      {
        "month": "2023-10-01",
        "product": "Cirrus",
        "users": 1230481
      },
      {
        "month": "2023-11-01",
        "product": "Cirrus",
        "users": 1249919
      },
      {
        "month": "2023-12-01",
        "product": "Cirrus",
        "users": 1275500
      },
      {
        "month": "2024-01-01",
        "product": "Cirrus",
        "users": 1290499
      },
      {
        "month": "2024-02-01",
        "product": "Cirrus",
        "users": 1303049
      },
      {
        "month": "2024-03-01",
        "product": "Cirrus",
        "users": 1318022
      },
      {
        "month": "2024-04-01",
        "product": "Cirrus",
        "users": 1335366
      },
      {
        "month": "2024-05-01",
        "product": "Cirrus",
        "users": 1348617
      },
      {
        "month": "2024-06-01",
        "product": "Cirrus",
        "users": 1371865
      },
      {
        "month": "2024-07-01",
        "product": "Cirrus",
        "users": 1389802
      },
      {
        "month": "2024-08-01",
        "product": "Cirrus",
        "users": 1409583
      },
      {
        "month": "2024-09-01",
        "product": "Cirrus",
        "users": 1437351
      },
      {
        "month": "2024-10-01",
        "product": "Cirrus",
        "users": 1463544
      },
      {
        "month": "2024-11-01",
        "product": "Cirrus",
        "users": 1491790
      },
      {
        "month": "2024-12-01",
        "product": "Cirrus",
        "users": 1505431
      }
    ],
    "companies": [
      {
        "company": "Northwind",
        "employees": 12,
        "revenue": 1400000,
        "sector": "Software"
      },
      {
        "company": "Pinecrest",
        "employees": 48,
        "revenue": 7900000,
        "sector": "Retail"
      },
      {
        "company": "Bluefin",
        "employees": 230,
        "revenue": 31000000,
        "sector": "Industry"
      },
      {
        "company": "Corvid",
        "employees": 1100,
        "revenue": 190000000,
        "sector": "Software"
      },
      {
        "company": "Halcyon",
        "employees": 5200,
        "revenue": 1100000000,
        "sector": "Retail"
      },
      {
        "company": "Ironleaf",
        "employees": 35,
        "revenue": 2200000,
        "sector": "Industry"
      },
      {
        "company": "Juniper",
        "employees": 640,
        "revenue": 64000000,
        "sector": "Software"
      },
      {
        "company": "Kestrel",
        "employees": 18000,
        "revenue": 4600000000,
        "sector": "Retail"
      },
      {
        "company": "Larkspur",
        "employees": 3,
        "revenue": 210000,
        "sector": "Industry"
      },
      {
        "company": "Meridian",
        "employees": 150,
        "revenue": 40000000,
        "sector": "Software"
      },
      {
        "company": "Nimbus",
        "employees": 2600,
        "revenue": 280000000,
        "sector": "Retail"
      },
      {
        "company": "Orchard",
        "employees": 80,
        "revenue": 25000000,
        "sector": "Industry"
      }
    ]
  },
  "charts": [
    {
      "title": "Monthly active users of three products",
      "note": "Atlas grows fastest although it is still the smallest: on this scale steady growth is a straight line, and the steeper the line, the faster the growth.",
      "how": "On a log scale (scale.log) equal ratios are equal steps, so steady growth is a straight line and its slope is the growth rate: Atlas grows fastest although it is still the smallest. On a linear scale the two small products would lie flat on the bottom.",
      "spec": {
        "data": "mau",
        "size": [
          680,
          320
        ],
        "scales": {
          "x": {
            "type": "time"
          },
          "y": {
            "type": "log"
          },
          "color": {
            "type": "color"
          }
        },
        "guides": [
          {
            "type": "grid",
            "scale": "y"
          },
          {
            "type": "axis",
            "scale": "x",
            "format": "month"
          },
          {
            "type": "axis",
            "scale": "y"
          },
          {
            "type": "legend",
            "scale": "color",
            "position": "top"
          }
        ],
        "marks": [
          {
            "type": "line",
            "x": "month",
            "y": "users",
            "color": "product",
            "strokeWidth": 2
          }
        ],
        "interaction": [
          {
            "type": "legend-filter"
          },
          {
            "type": "tooltip",
            "formats": {
              "users": "integer",
              "month": "month"
            }
          }
        ]
      }
    },
    {
      "title": "Revenue and headcount of twelve companies",
      "note": "Revenue rises with headcount, from 3 employees and $210K to 18,000 employees and $4.6B.",
      "how": "Both axes are logarithmic: from 3 to 18,000 employees and from $210K to $4.6B of revenue, every company has room. The axis format writes the ticks as currency; without it they are compact (1K, 1M).",
      "spec": {
        "data": "companies",
        "size": [
          680,
          340
        ],
        "scales": {
          "x": {
            "type": "log"
          },
          "y": {
            "type": "log"
          },
          "color": {
            "type": "color"
          }
        },
        "guides": [
          {
            "type": "grid",
            "scale": "x"
          },
          {
            "type": "grid",
            "scale": "y"
          },
          {
            "type": "axis",
            "scale": "x",
            "title": "Employees"
          },
          {
            "type": "axis",
            "scale": "y",
            "format": {
              "style": "currency",
              "currency": "USD",
              "notation": "compact"
            }
          },
          {
            "type": "legend",
            "scale": "color",
            "position": "top"
          }
        ],
        "marks": [
          {
            "type": "point",
            "x": "employees",
            "y": "revenue",
            "color": "sector",
            "r": 5,
            "opacity": 0.9
          }
        ],
        "interaction": [
          {
            "type": "tooltip",
            "fields": [
              "company",
              "sector",
              "employees",
              "revenue"
            ],
            "formats": {
              "employees": "integer",
              "revenue": {
                "style": "currency",
                "currency": "USD",
                "notation": "compact"
              }
            }
          }
        ]
      }
    }
  ]
}

The report the composer makes from it is one standalone file (95.5 KB): open it from disk, mail it, print it.

In a page of your own

The charts above use the timeseries kit (52.1 KB gzipped), the smallest one that has the blocks this example needs: lib.curve, lib.pointer, scale.color, scale.log, scale.time, mark.line, mark.point, guide.axis, guide.grid, guide.legend, interaction.legend-filter, interaction.tooltip, renderer.svg. The HTML below loads it from the jsDelivr CDN, pinned to version 0.0.5; to serve it from your own site, put its file there (the files of a release) and change the address.

HTML

<script src="https://cdn.jsdelivr.net/npm/blockcharts@0.0.5/release/kits/timeseries.js"></script>

<script type="application/json" id="bc-data">
{"mau":[{"month":"2022-01-01","product":"Atlas","users":1200},{"month":"2022-02-01","product":"Atlas","users":1315},{"month":"2022-03-01","product":"Atlas","users":1552},{"month":"2022-04-01","product":"Atlas","users":1856},{"month":"2022-05-01","product":"Atlas","users":2104},{"month":"2022-06-01","product":"Atlas","users":2484},{"month":"2022-07-01","product":"Atlas","users":2753},{"month":"2022-08-01","product":"Atlas","users":3100},{"month":"2022-09-01","product":"Atlas","users":3554},{"month":"2022-10-01","product":"Atlas","users":4076},{"month":"2022-11-01","product":"Atlas","users":4818},{"month":"2022-12-01","product":"Atlas","users":5847},{"month":"2023-01-01","product":"Atlas","users":6855},{"month":"2023-02-01","product":"Atlas","users":7649},{"month":"2023-03-01","product":"Atlas","users":8552},{"month":"2023-04-01","product":"Atlas","users":9666},{"month":"2023-05-01","product":"Atlas","users":11396},{"month":"2023-06-01","product":"Atlas","users":13009},{"month":"2023-07-01","product":"Atlas","users":14322},{"month":"2023-08-01","product":"Atlas","users":17378},{"month":"2023-09-01","product":"Atlas","users":19790},{"month":"2023-10-01","product":"Atlas","users":21912},{"month":"2023-11-01","product":"Atlas","users":25232},{"month":"2023-12-01","product":"Atlas","users":30706},{"month":"2024-01-01","product":"Atlas","users":36217},{"month":"2024-02-01","product":"Atlas","users":40764},{"month":"2024-03-01","product":"Atlas","users":47988},{"month":"2024-04-01","product":"Atlas","users":55420},{"month":"2024-05-01","product":"Atlas","users":62653},{"month":"2024-06-01","product":"Atlas","users":69309},{"month":"2024-07-01","product":"Atlas","users":80451},{"month":"2024-08-01","product":"Atlas","users":93855},{"month":"2024-09-01","product":"Atlas","users":112607},{"month":"2024-10-01","product":"Atlas","users":127919},{"month":"2024-11-01","product":"Atlas","users":144085},{"month":"2024-12-01","product":"Atlas","users":170465},{"month":"2022-01-01","product":"Beacon","users":40000},{"month":"2022-02-01","product":"Beacon","users":41753},{"month":"2022-03-01","product":"Beacon","users":44824},{"month":"2022-04-01","product":"Beacon","users":48493},{"month":"2022-05-01","product":"Beacon","users":52163},{"month":"2022-06-01","product":"Beacon","users":54629},{"month":"2022-07-01","product":"Beacon","users":58989},{"month":"2022-08-01","product":"Beacon","users":62850},{"month":"2022-09-01","product":"Beacon","users":67425},{"month":"2022-10-01","product":"Beacon","users":70686},{"month":"2022-11-01","product":"Beacon","users":74464},{"month":"2022-12-01","product":"Beacon","users":77710},{"month":"2023-01-01","product":"Beacon","users":82088},{"month":"2023-02-01","product":"Beacon","users":86475},{"month":"2023-03-01","product":"Beacon","users":90344},{"month":"2023-04-01","product":"Beacon","users":97206},{"month":"2023-05-01","product":"Beacon","users":102519},{"month":"2023-06-01","product":"Beacon","users":107139},{"month":"2023-07-01","product":"Beacon","users":112923},{"month":"2023-08-01","product":"Beacon","users":121304},{"month":"2023-09-01","product":"Beacon","users":130519},{"month":"2023-10-01","product":"Beacon","users":137927},{"month":"2023-11-01","product":"Beacon","users":146125},{"month":"2023-12-01","product":"Beacon","users":155216},{"month":"2024-01-01","product":"Beacon","users":163060},{"month":"2024-02-01","product":"Beacon","users":173025},{"month":"2024-03-01","product":"Beacon","users":183595},{"month":"2024-04-01","product":"Beacon","users":195328},{"month":"2024-05-01","product":"Beacon","users":207940},{"month":"2024-06-01","product":"Beacon","users":224741},{"month":"2024-07-01","product":"Beacon","users":237900},{"month":"2024-08-01","product":"Beacon","users":250241},{"month":"2024-09-01","product":"Beacon","users":264699},{"month":"2024-10-01","product":"Beacon","users":283615},{"month":"2024-11-01","product":"Beacon","users":298845},{"month":"2024-12-01","product":"Beacon","users":316827},{"month":"2022-01-01","product":"Cirrus","users":900000},{"month":"2022-02-01","product":"Cirrus","users":912262},{"month":"2022-03-01","product":"Cirrus","users":926703},{"month":"2022-04-01","product":"Cirrus","users":942257},{"month":"2022-05-01","product":"Cirrus","users":954381},{"month":"2022-06-01","product":"Cirrus","users":971043},{"month":"2022-07-01","product":"Cirrus","users":982701},{"month":"2022-08-01","product":"Cirrus","users":1001068},{"month":"2022-09-01","product":"Cirrus","users":1020301},{"month":"2022-10-01","product":"Cirrus","users":1031187},{"month":"2022-11-01","product":"Cirrus","users":1048224},{"month":"2022-12-01","product":"Cirrus","users":1058656},{"month":"2023-01-01","product":"Cirrus","users":1073802},{"month":"2023-02-01","product":"Cirrus","users":1087864},{"month":"2023-03-01","product":"Cirrus","users":1099583},{"month":"2023-04-01","product":"Cirrus","users":1118466},{"month":"2023-05-01","product":"Cirrus","users":1136949},{"month":"2023-06-01","product":"Cirrus","users":1160788},{"month":"2023-07-01","product":"Cirrus","users":1177404},{"month":"2023-08-01","product":"Cirrus","users":1190345},{"month":"2023-09-01","product":"Cirrus","users":1208652},{"month":"2023-10-01","product":"Cirrus","users":1230481},{"month":"2023-11-01","product":"Cirrus","users":1249919},{"month":"2023-12-01","product":"Cirrus","users":1275500},{"month":"2024-01-01","product":"Cirrus","users":1290499},{"month":"2024-02-01","product":"Cirrus","users":1303049},{"month":"2024-03-01","product":"Cirrus","users":1318022},{"month":"2024-04-01","product":"Cirrus","users":1335366},{"month":"2024-05-01","product":"Cirrus","users":1348617},{"month":"2024-06-01","product":"Cirrus","users":1371865},{"month":"2024-07-01","product":"Cirrus","users":1389802},{"month":"2024-08-01","product":"Cirrus","users":1409583},{"month":"2024-09-01","product":"Cirrus","users":1437351},{"month":"2024-10-01","product":"Cirrus","users":1463544},{"month":"2024-11-01","product":"Cirrus","users":1491790},{"month":"2024-12-01","product":"Cirrus","users":1505431}],"companies":[{"company":"Northwind","employees":12,"revenue":1400000,"sector":"Software"},{"company":"Pinecrest","employees":48,"revenue":7900000,"sector":"Retail"},{"company":"Bluefin","employees":230,"revenue":31000000,"sector":"Industry"},{"company":"Corvid","employees":1100,"revenue":190000000,"sector":"Software"},{"company":"Halcyon","employees":5200,"revenue":1100000000,"sector":"Retail"},{"company":"Ironleaf","employees":35,"revenue":2200000,"sector":"Industry"},{"company":"Juniper","employees":640,"revenue":64000000,"sector":"Software"},{"company":"Kestrel","employees":18000,"revenue":4600000000,"sector":"Retail"},{"company":"Larkspur","employees":3,"revenue":210000,"sector":"Industry"},{"company":"Meridian","employees":150,"revenue":40000000,"sector":"Software"},{"company":"Nimbus","employees":2600,"revenue":280000000,"sector":"Retail"},{"company":"Orchard","employees":80,"revenue":25000000,"sector":"Industry"}]}
</script>

<script type="application/json" data-bc-chart>
{
  "data": "mau",
  "size": [
    680,
    320
  ],
  "scales": {
    "x": {
      "type": "time"
    },
    "y": {
      "type": "log"
    },
    "color": {
      "type": "color"
    }
  },
  "guides": [
    {
      "type": "grid",
      "scale": "y"
    },
    {
      "type": "axis",
      "scale": "x",
      "format": "month"
    },
    {
      "type": "axis",
      "scale": "y"
    },
    {
      "type": "legend",
      "scale": "color",
      "position": "top"
    }
  ],
  "marks": [
    {
      "type": "line",
      "x": "month",
      "y": "users",
      "color": "product",
      "strokeWidth": 2
    }
  ],
  "interaction": [
    {
      "type": "legend-filter"
    },
    {
      "type": "tooltip",
      "formats": {
        "users": "integer",
        "month": "month"
      }
    }
  ],
  "alt": "Monthly active users of three products"
}
</script>

<script type="application/json" data-bc-chart>
{
  "data": "companies",
  "size": [
    680,
    340
  ],
  "scales": {
    "x": {
      "type": "log"
    },
    "y": {
      "type": "log"
    },
    "color": {
      "type": "color"
    }
  },
  "guides": [
    {
      "type": "grid",
      "scale": "x"
    },
    {
      "type": "grid",
      "scale": "y"
    },
    {
      "type": "axis",
      "scale": "x",
      "title": "Employees"
    },
    {
      "type": "axis",
      "scale": "y",
      "format": {
        "style": "currency",
        "currency": "USD",
        "notation": "compact"
      }
    },
    {
      "type": "legend",
      "scale": "color",
      "position": "top"
    }
  ],
  "marks": [
    {
      "type": "point",
      "x": "employees",
      "y": "revenue",
      "color": "sector",
      "r": 5,
      "opacity": 0.9
    }
  ],
  "interaction": [
    {
      "type": "tooltip",
      "fields": [
        "company",
        "sector",
        "employees",
        "revenue"
      ],
      "formats": {
        "employees": "integer",
        "revenue": {
          "style": "currency",
          "currency": "USD",
          "notation": "compact"
        }
      }
    }
  ],
  "alt": "Revenue and headcount of twelve companies"
}
</script>