Мне было поручено реализовать следующий дизайн с использованием chart.js:
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
});
< /code>
Единственное, что не реализовано, - это маленькие пробелы, которые находятся между точками и линиями на диаграмме. Есть ли способ добавить их в chart.js? Мне нужен собственный плагин?
Подробнее здесь: https://stackoverflow.com/questions/795 ... eir-points