import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
})
export class AppComponent {
title = 'GFG';
data = {
labels: ['A', 'B', 'C', 'D', 'E', 'F', 'G'],
datasets: [{
type: 'line',
label: 'City',
borderColor: 'red',
borderWidth: 2,
fill: false,
data: [49, 24, 22, 38, 26, 46, 54]
},
{
type: 'bar',
label: 'States',
backgroundColor: '#66BB6A',
data: [31, 74, 34, 65, 47, 45, 75],
borderColor: 'white',
borderWidth: 2
}]
};
chartOptions = {
plugins: {
legend: {
labels: {
color: 'black'
}
}
},
scales: {
x: {
ticks: {
color: 'black'
},
grid: {
color: 'grey'
}
},
y: {
ticks: {
color: 'black'
},
grid: {
color: 'grey'
}
}
}
};
}