Link to my codepen project: Check it out here
let ctx = document.getElementById('myChart').getContext('2d');
let chart = new Chart(ctx, {
// Type of chart being created
type: 'bar',
// Data for the dataset
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [{
label: 'My First dataset',
backgroundColor: 'rgb(255, 99, 132)',
borderColor: 'rgb(255, 99, 132)',
data: [0, -10, 35, 2, -19, 30, 15]
}]
},
// Configuration options go here
options: {}
});
<canvas id="myChart"></canvas>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ceada6afbcbae0a4bd8efce0f6e0fe">[email protected]</a>"></script>
I would like to change the color of a column when its value is 0 and adjust its position. Thank you.
The desired result looks like this: https://i.sstatic.net/MiFZN.png