我正在使用ng2-charts“:” ^ 1.6.0,带有角度以显示如下所示的图表。我使用了折线图并将样式更改为散点图,以在图表中显示点。现在,待处理的部分是为图表中的固定区域着色。 1,1应该绿色5,5应该黄色等
我该如何样式化
// scatterChart
public scatterChartData: Array<any> = [
{
data: [{
x: 0.2,
y: 0.877
}], label: 'Mean Value/Standard Deviation'
}
];
public scatterChartOptions: any = {
responsive: true,
scales: {
yAxes: [{
ticks: {
steps: 10,
stepValue: 0.1,
max: 10,
min: 0
}
}],
xAxes: [{
type: 'linear',
position: 'bottom',
ticks: {
steps: 10,
stepValue: 0.1,
max: 10,
min: 0
}
}]
}
};
public scatterChartColors: Array<any> = [
{
// grey
backgroundColor: 'transparent',
borderColor: 'transparent',
pointBackgroundColor: 'rgba(77,83,96,1)',
pointBorderColor: '#fff',
pointHoverBackgroundColor: '#fff',
pointHoverBorderColor: 'rgba(77,83,96,1)'
}
];
public scatterChartLegend: boolean = true;
public scatterChartType: string = 'line';