import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'GFG';
basicData = {
labels: ['January', 'February', 'March',
'April', 'May', 'June', 'July'],
datasets: [{
label: 'Dataset 1',
backgroundColor: 'green',
AxisID: 'x',
data: [65, 59, 80, 81, 56, 55, 10]
}, {
label: 'Dataset 2',
backgroundColor: 'pink',
AxisID: 'x1',
data: [28, 48, 40, 19, 86, 27, 90]
},
{
label: 'Dataset 3',
backgroundColor: 'yellow',
AxisID: 'x',
data: [32, 38, 60, 29, 26, 77, 60]
}
]
}
multiAxisOptions = {
indexAxis: 'y',
plugins: {
legend: {
labels: {
color: '#black'
}
},
tooltips: {
mode: 'index',
intersect: true
}
},
scales: {
y: {
ticks: {
color: '#black'
},
},
x: {
type: 'linear',
display: true,
position: 'left',
ticks: {
min: 0,
max: 100,
color: '#black'
},
},
x1: {
type: 'linear',
display: true,
position: 'right',
ticks: {
min: 0,
max: 100,
color: 'red'
}
}
}
};
}