Chartjs-How to order a horizontal bar chart – chartJS & Chart.HorizontalBar.js

1πŸ‘

βœ…

Just swap the order in the input i.e.

var barChartData = {
    labels: ["Allergan PLC", "Amazon.com Inc", "Facebook Inc Class A"],
    datasets: [{
        fillColor: "rgba(220,220,220,0.5)",
        strokeColor: "rgba(220,220,220,0.8)",
        highlightFill: "rgba(220,220,220,0.75)",
        highlightStroke: "rgba(220,220,220,1)",
        data: [7, 8, 9]
    }]
};

Leave a comment