请帮助您了解如何为动态值设置条宽。我想要单个值的固定宽度:
var config = {
type: 'bar',
data: {
labels: ["January"],
datasets: [
{
type: 'bar',
label: 'Dataset 1',
backgroundColor: "red",
data: [65,4,30,20,70],
}, {
type: 'bar',
label: 'Dataset 3',
backgroundColor: "blue",
data: [-65]
}]
},
options: {
scales: {
xAxes: [{
stacked: true
}],
yAxes: [{
stacked: true
}]
}
}
};
var ctx = document.getElementById("myChart").getContext("2d");
new Chart(ctx, config);

<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.0/Chart.bundle.min.js"></script>
<div style="width:600px">
<canvas id="myChart"></canvas>
</div>
&#13;