Chartjs-Angular horizontal bar chart.js

0👍

Try this

const config = {
  type: 'bar',
  data,
  options: {
    indexAxis: 'y',
    scales: {
      y: {
        position: 'top',
      },
    },
  },
};

const data = {
  labels: [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5],
  datasets: [{
    label: 'My Dataset',
    data: [20, 40, 100, 80],
    backgroundColor: 'blue',
  }],
};

Leave a comment