I have been tasked with implementing the following design using Chart.js:
Almost everything's been implemented (via the Chart.js documentation):
const chart = new Chart(document.getElementById('chart'), {
type: 'line',
data: {
datasets: [{
label: 'Line 1',
data: line1Values, // Set earlier in the code
borderColor: '#E66FD2',
backgroundColor: '#E66FD2',
pointStyle: 'circle',
pointRadius: 4,
borderWidth: 2,
lineTension: 0.4
}, {
label: 'Line 2',
data: line2Values, // Set earlier in the code
borderColor: '#8C6FE6',
backgroundColor: '#8C6FE6',
pointStyle: 'circle',
pointRadius: 4,
borderWidth: 2,
lineTension: 0.4
}]
},
// More configuration
});
The one thing not implemented is the little gaps that are between the dots and the lines on the chart. Is there a way to add them in Chart.js? Do I need a custom plugin? Thanks in advance!