Chart.js ChartJs-角线和记号';在顶部';
我有一个如下所示的图表。我有两个期望,首先,你可以看到在转储数据集的背景色后面隐藏的记号号(1,2,3,4,5)(我需要背景色,这就是我使用假数据集的原因)。我需要向他们展示像使用z-index之类的东西。我用红色为样本写了勾号 其次,我需要在顶部的显示角度线也Chart.js ChartJs-角线和记号';在顶部';,chart.js,Chart.js,我有一个如下所示的图表。我有两个期望,首先,你可以看到在转储数据集的背景色后面隐藏的记号号(1,2,3,4,5)(我需要背景色,这就是我使用假数据集的原因)。我需要向他们展示像使用z-index之类的东西。我用红色为样本写了勾号 其次,我需要在顶部的显示角度线也 var test2 = [2, 2, 2, 2, 2]; var test3 = [3, 3, 3, 3, 3]; var test4 = [4, 4, 4, 4, 4]; var test5 = [5, 5, 5, 5, 5]; n
var test2 = [2, 2, 2, 2, 2];
var test3 = [3, 3, 3, 3, 3];
var test4 = [4, 4, 4, 4, 4];
var test5 = [5, 5, 5, 5, 5];
new Chart(document.getElementById("myChart"), {
type: 'radar',
data: {
labels: sectionDescriptions,
datasets: [
{
label: "2050",
fill: true,
borderColor: "rgba(0,0,0,1)",
borderWidth: "4",
pointRadius: 3,
pointBorderWidth: 3,
pointBackgroundColor: "cornflowerblue",
pointBorderColor: "rgba(0,0,200,0.6)",
pointHoverRadius: 10,
data: sectionPoints
},
{
radius: 0,
fill: true,
backgroundColor: "rgba(240,0,0,1)",
data: test2
},
{
radius: 0,
fill: true,
backgroundColor: "rgba(255,190,4,1)",
data: test3
},
{
radius: 0,
fill: true,
backgroundColor: "rgba(255,250,5,1)",
data: test4
},
{
radius: 0,
fill: true,
backgroundColor: "rgba(0,180,233,1)",
data: test5
}
]
},
options: {
title: {
display: true,
text: 'Chart'
},
scale: {
gridLine: {
color : "white"
},
ticks: {
beginAtZero: true,
min: 0,
max: 5,
stepSize: 1,
fontColor: 'black',
backDropColor: 'black'
},
pointLabels: {
fontSize: 13,
//fontStyle: 'bold'
}
},
legend: {
display: false
}
}
});
这是您已经创建但要修改的图表吗?那样的话,请把你的密码贴出来。或者这是你想要达到的目标的模型。