【发布时间】:2022-01-07 04:23:17
【问题描述】:
我已经在 Jquery 中为我的图表编写了代码,并且我正在使用该图表在我的 Django 网页上显示数据,我想删除我认为称为刻度的内圈以及显示的小数字他们。我尝试过使用
滴答声:{ 显示:假, }
和
规模:{ 显示:假, }
但是没有运气,我不知道该怎么做。
图表代码:
new Chart("chart_{{ i.pk }}_{{ t.pk }}", {
type: "polarArea",
data: {
labels: labels_{{ t.pk }},
datasets: [{
fill: true,
pointRadius: 1,
{# borderColor: backgroundColors_{{ t.pk }} ,#}
backgroundColor: backgroundColors_{{ t.pk }} ,
data: totals_{{ i.pk }}_{{ t.pk }}_arr,
}]
},
options: {
responsive: false,
maintainAspectRatio: true,
plugins: {
legend: {
display: false,
},
scale: {
ticks: {
display: false,
},
gridLines: {
display: false,
lineWidth: 7,
tickMarkLength: 30// Adjusts the height for the tick marks area
},
},
title: {
display: false,
text: 'Chart.js Polar Area Chart'
}
}
}
});
{% endfor %}
{% endfor %}
{% endblock %}
【问题讨论】:
-
这能回答你的问题吗? stackoverflow.com/a/63313163/2358409
标签: javascript jquery django chart.js