Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
session cache updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeru committed Apr 8, 2022
1 parent 4200d87 commit 854d34d
Showing 1 changed file with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, ElementRef, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
import * as echarts from 'echarts';
import { EChartsOption } from 'echarts';
import { ChartConfig } from './model/config.modal';
Expand All @@ -28,13 +28,12 @@ import {
} from '@c8y/client';
import { extractValueFromJSON } from './util/extractValueFromJSON.util';
import { ResizedEvent } from 'angular-resize-event';
import { element } from 'protractor';
@Component({
selector: 'lib-gp-smart-echart-widget',
templateUrl: './gp-smart-echart-widget.component.html',
styles: ['gp-smart-echart-widget.component.css']
})
export class GpSmartEchartWidgetComponent implements OnInit, OnDestroy {
export class GpSmartEchartWidgetComponent implements OnInit {
@ViewChild('chartBox', { static: true }) protected mapDivRef: ElementRef;
@Input() config: ChartConfig;
serviceData;
Expand Down Expand Up @@ -180,7 +179,7 @@ export class GpSmartEchartWidgetComponent implements OnInit, OnDestroy {
}
if (!userInput.aggrList) {
userInput.aggrList = [];
}
}
if (this.serviceData) {
this.dataChart.hideLoading();
let axisFontSize = 0;
Expand Down Expand Up @@ -2333,15 +2332,6 @@ export class GpSmartEchartWidgetComponent implements OnInit, OnDestroy {
}
}, 2000);
}
// Clear the session storage items
ngOnDestroy() {
if (sessionStorage.getItem('Chartsession')) {
sessionStorage.removeItem('Chartsession');
}
if (sessionStorage.getItem('serviceRunning')) {
sessionStorage.removeItem('serviceRunning');
}
}
// Event called on resize of chart box
onResized(event: ResizedEvent) {
this.width = event.newWidth;
Expand Down

0 comments on commit 854d34d

Please sign in to comment.