Horizontal-Bar-Chart angular-chart.js

Habe ich erfolgreich erstellt ein Balkendiagramm, in angular-chart.js aber das will ich jetzt ändern Sie es in ein horizontales Balkendiagramm. Außerdem möchte ich die Felder in der horizontalen Leiste selbst:

code

 angular.module("app", ["chart.js"])
    .controller("LineCtrl", function ($scope) {

    var x =
    {
        "labels": [
            "Monday",
            "Tuesday",
            "Wednesday",
            "Thursday",
            "Friday",
            "Saturday",
            "Sunday"
        ],
        "data": [
            99,
            59,
            80,
            81,
            56,
            55,
            40
        ],
        "type": "line",
        "series": "eventTypePerDay"
    }

    console.log(x.series);
    //ses all of the variables to build the chart
    $scope.labels = x.labels;
    $scope.colours = ['#71d078'];
    $scope.type = x.type;
    $scope.data = [x.data];
    $scope.series = [x.series];


});

Beispiel für das, was ich will

Horizontal-Bar-Chart angular-chart.js

InformationsquelleAutor user2402107 | 2015-11-10

Schreibe einen Kommentar