我已经在线尝试了所有资源,它们适用于 1.6 版。也浏览了代码,但无法找到关于酒吧风格的东西......有人解决了这个问题吗?谢谢
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
}
}
});