I'm trying to change one graphic, I want to hide the dataset labels, but nothing I tried is working.
Graphic
The library that I'm using is library:
import { ChartDataSets, ChartOptions, ChartType } from 'chart.js';
import { Color } from 'ng2-charts/public_api';
import { BaseChartDirective,Label } from 'ng2-charts';
This is my code:
labelsGraphic:[];
public lineChartData: ChartDataSets[] = [{data:[], label:""}];
public lineChartLabels:Label[];
public lineChartColors: Color[] = [
{ // blue
backgroundColor: '#13161a',
borderColor: '#257bcc',
pointBackgroundColor: 'rgba(148,159,177,1)',
pointBorderColor: '',
pointRadius:0,
pointHoverBackgroundColor: '#fff',
pointHoverBorderColor: 'rgba(148,159,177,0.8)'
},
];
public lineChartOptions: (ChartOptions & { annotation: any }) = {
responsive: true,
scales: {
xAxes: [{
gridLines: {
display: false
}
}],
yAxes: [{
gridLines: {
display: false
}
}]
},
annotation: {
},
};
public lineChartLegend = false;
public lineChartType: ChartType = 'line';
I tried changing gridLines to ticks but I think this object is not modifying anything.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…