Gallery › Bar chart

Bar chart: Building permits issued in 2026, by type

Like column, drawn sideways: best for long category names or many categories.

Building permits issued in 2026, by typeHalcyon County Development Services, January to September

Bar chart of Permits across 7 values of Permit type. The value is highest for New single-family home (214) and lowest for Demolition (12).

050100150200250New single-family homeRemodel or additionFence, deck or patioSwimming poolCommercial build-outAccessory dwelling unitDemolition21416713948362112
0100200300New single-familyhomeRemodel or additionFence, deck or patioSwimming poolCommercialbuild-outAccessory dwellingunitDemolition21416713948362112
Data for “Building permits issued in 2026, by type”
Permit typePermits
New single-family home214
Remodel or addition167
Fence, deck or patio139
Swimming pool48
Commercial build-out36
Accessory dwelling unit21
Demolition12

Source: Halcyon County sample data (fictional, for the demo)

The spec

This is everything OSCharts needed to draw the chart above. The data is a table: named columns and rows, the way it sits in a spreadsheet.

{
  "id": "permits-by-type",
  "type": "bar",
  "title": "Building permits issued in 2026, by type",
  "subtitle": "Halcyon County Development Services, January to September",
  "source": "Halcyon County sample data (fictional, for the demo)",
  "data": {
    "columns": [
      "Permit type",
      "Permits"
    ],
    "rows": [
      [
        "New single-family home",
        214
      ],
      [
        "Remodel or addition",
        167
      ],
      [
        "Fence, deck or patio",
        139
      ],
      [
        "Swimming pool",
        48
      ],
      [
        "Commercial build-out",
        36
      ],
      [
        "Accessory dwelling unit",
        21
      ],
      [
        "Demolition",
        12
      ]
    ]
  }
}

Put it on a page

In a browser, load the two files and mount the chart:

<link rel="stylesheet" href="oscharts.css">
<script src="oscharts.js" defer></script>
<div id="chart"></div>
<script type="module">
  OSCharts.mount(document.getElementById("chart"), spec);
</script>

Or render it on a server or in a build step, so the chart is in the page before any JavaScript runs:

import { render } from "oscharts";
const html = render(spec);   // a complete, accessible <figure>

Command line: npx oscharts render spec.json > chart.html