Basic bar

Ranked horizontal bars.

Chart type
Bar bar
Tier
Free Core
Collection
Bar
Render
Live, site theme
View .md Agent setup
LIVE/bar/basic-bar1 of 12 in Bar

Configuration

Raw Standalone
const options = {
  chart: {
    height: 380,
    fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
    type: "bar",
    toolbar: {
      show: false
    }
  },
  series: [
    {
      name: "Visitors",
      data: [877, 532, 531, 482, 421, 153, 151, 135, 131, 100]
    }
  ],
  xaxis: {
    categories: ["Lisbon", "Oslo", "Seattle", "Osaka", "Austin", "Porto", "Tallinn", "Lyon", "Bergen", "Denver"]
  },
  plotOptions: {
    bar: {
      horizontal: true,
      borderRadius: 3,
      barHeight: "64%"
    }
  },
  dataLabels: {
    enabled: false
  },
  title: {
    text: "Visitors by city (k)"
  },
  theme: {
    mode: "light",
    preset: "coastal"
  }
}

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