Flight cabins

Seats by cabin, nose to tail, inside a plane outline.

Chart type
Unit unit
Tier
Free Core
Collection
Unit & pictogram
Render
Live, site theme
View .md Agent setup
LIVE/unit/flight-cabins22 of 33 in Unit

Configuration

Raw Standalone
const options = {
  chart: {
    height: 440,
    fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
    type: "unit",
    toolbar: {
      show: false
    }
  },
  series: [12, 36, 168],
  labels: ["First", "Business", "Economy"],
  colors: ["#7c3aed", "#2563eb", "#94a3b8"],
  plotOptions: {
    unit: {
      positions: {
        name: "plane",
        category: "transport",
        kind: "silhouette",
        rings: [
          [
            [0.5, 0],
            [0.56, 0.08],
            [0.57, 0.36],
            [1, 0.56],
            [1, 0.64],
            [0.57, 0.54],
            [0.56, 0.82],
            [0.7, 0.94],
            [0.7, 1],
            [0.5, 0.95],
            [0.3, 1],
            [0.3, 0.94],
            [0.44, 0.82],
            [0.43, 0.54],
            [0, 0.64],
            [0, 0.56],
            [0.43, 0.36],
            [0.44, 0.08]
          ]
        ],
        source: "original",
        minUnits: 60,
        aspect: 0.9,
        order: "rows",
        cx: undefined,
        cy: undefined,
        shape: {
          name: "plane",
          category: "transport",
          kind: "silhouette",
          minUnits: 60,
          order: "rows",
          source: "original"
        },
        with: e=>St({...t,...e||{}}),
        outlined: function outlined(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.16;const n=t.rings.map(t=>{const n=t.reduce((t,e)=>t+e[0],0)/t.length,a=t.reduce((t,e)=>t+e[1],0)/t.length;return t.map(t=>{let o=b(t,2);return[n+(o[0]-n)*(1-e),a+(o[1]-a)*(1-e)]})});return St({...t,name:t.name+"-outlined",kind:"stroke",rings:t.rings.concat(n)})},
        fill: (t,n)=>wt(e,t,n),
        isUnitShape: true
      },
      shape: "square",
      borderRadius: 1
    }
  },
  title: {
    text: "216 seats by cabin"
  },
  theme: {
    mode: "light",
    preset: "coastal"
  }
}

const chart = new WestCoastCharts(document.querySelector('#chart'), options)
chart.render()