0

I've tried all resources online and they apply to version 1.6. Also went through the code, but wasn't able to find something in regards to the bar style...has anyone solved this? thanks

var data = {
    labels: ["T", "Last Week", "S"],
    datasets: [
        {
            label: "Today",
            backgroundColor: ["#FFB800", "#5D3CC5", "#30B200"],
            borderColor: ["#C89100", "#22008E", "#268B00"],
            borderWidth: 2,
            hoverBackgroundColor: "rgba(255,99,132,0.4)",
            hoverBorderColor: "rgba(255,99,132,1)",
            data: [65, 59, 49]
        }
    ]
};

var ctx = this.$el.getContext("2d");

var myBarChart = new Chart(ctx, {
    type: 'horizontalBar',
    data: data,
    options: {

        legend: {
            display: false
        },

        scales: {
            yAxes: [{
                display: false
                // ticks: {
                //     beginAtZero: true
                // }
            }],

            xAxes: [{
                //display: false,
                ticks: {
                    beginAtZero: true
                }
            }]

        },

        gridLines: {
            display: false
        },

        tooltips: {
            cornerRadius: 6
        }

    }


});
Joeytje50
  • 18,636
  • 15
  • 63
  • 95
  • 1
    Please show what you have tried so far, which parts of the documentation you've gone through. Showing what you've done so far has 2 advantages for both you and us: it makes it much easier to understand what you want to do exactly, and it makes it easier to build on your attempts to find a working solution. That helps you get your answer more easily. – Joeytje50 Jul 01 '16 at 19:37
  • I haven't found anything online that would make a difference to the code, nor in the chart.js library. I've tried using the older plugins for the curve design, but it only applied to version 1.6 . This is the code I'm currently working on: – Jeffrey Paulino Jul 01 '16 at 20:27
  • Please include the relevant code in your question itself, instead of putting it in the comments. – Joeytje50 Jul 01 '16 at 20:29
  • I'm trying to input the code but the system says its above the character amount. How can I post it? – Jeffrey Paulino Jul 01 '16 at 20:32
  • Pardon, I forgot to mention that I'm using Vue on this, because of it, I've set the context to 'var ctx = this.$el.getContext("2d");' instead of 'var ctx =querySelector('.work').getContext("2d");'. I took the class /id off in order to re-utilize the data chart – Jeffrey Paulino Jul 01 '16 at 20:45
  • It works, its the curve detail that's the struggle. And Thanks for the quick response! – Jeffrey Paulino Jul 01 '16 at 20:47

0 Answers0