1
我使用以下配置如何修复在ChartJS中看起来模糊的图表?
var ctx = document.getElementById("myChart").getContext('2d');
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: labels,
datasets: [{
label: 'Voltage Fluctuation',
data: data,
borderWidth: 1,
fill: false,
}]
},
options: {
scales: {
xAxes: [{
type: 'time',
time: {
unit: 'minute',
displayFormats: {
hour: 'HH:mm:ss'
}
}
}]
},
}
});
图表供给800个数据点和它的相当模糊由具有ChartJS的图表。 有没有什么办法可以修改配置让该行是连续的和尖锐?
感谢。我现在把它设置为0.3,看起来比以前的迭代好得多,但颜色稍微有点亮。有什么可以让它变成纯黑色的线条? – Saikiran
集'pointBorderColor' /'pointBackgroundColor'为'black'的数据集。 –