"@types/ol": "^5.3.5",
"angular-notifier": "^6.0.1",
"bootstrap": "^4.4.1",
- "chart.js": "^3.2.1",
+ "chart.js": "^2.8.0",
"codemirror": "^5.51.0",
"core-js": "^2.5.4",
"d3": "^5.9.2",
"js-yaml": "^3.13.1",
"jsonpath": "^1.0.2",
"ng-sidebar": "~9.2.0",
- "ng2-charts": "^3.0.0-beta.5",
+ "ng2-charts": "^2.4.2",
"ng2-file-upload": "^1.3.0",
"ng2-smart-table": "~1.6.0",
"ol": "^5.3.3",
import { Component, Injector, OnInit } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { AuthenticationService } from 'AuthenticationService';
-import { ActiveElement, Chart, ChartEvent } from 'chart.js';
+import { Chart } from 'chart.js';
import { ERRORDATA } from 'CommonModel';
import { environment } from 'environment';
import { NSDDetails } from 'NSDModel';
data: this.noOfHours,
label: this.translateService.instant('NOOFHOURS'),
borderColor: this.backgroundColor,
+ fill: false,
backgroundColor: this.backgroundColor
}]
},
options: {
- onHover: (evt: ChartEvent, elements):void => {
- const el: HTMLElement = document.getElementById('canvas');
- el.style.cursor = elements[0] ? 'pointer' : 'default';
- },
- plugins: {
- legend: { display: false },
+ hover: {
+ onHover(evt: Event, item: {}): void {
+ const el: HTMLElement = document.getElementById('canvas');
+ el.style.cursor = item[0] ? 'pointer' : 'default';
+ }
},
+ legend: { display: false },
scales: {
- x: {
+ xAxes: [{
display: true,
- labels: [this.translateService.instant('INSTANCES')],
- },
- y: {
+ scaleLabel: {
+ display: true,
+ labelString: this.translateService.instant('INSTANCES')
+ }
+ }],
+ yAxes: [{
ticks: {
- labelOffset: 0,
+ beginAtZero: true
},
display: true,
- labels: [this.translateService.instant('NOOFHOURS')]
- },
+ scaleLabel: {
+ display: true,
+ labelString: this.translateService.instant('NOOFHOURS')
+ }
+ }]
}
}
});