source: trip-planner-front/node_modules/primeng/fesm2015/primeng-chart.mjs.map@ b738035

Last change on this file since b738035 was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago

adding photos

  • Property mode set to 100644
File size: 6.4 KB
Line 
1{"version":3,"file":"primeng-chart.mjs","sources":["../../src/app/components/chart/chart.ts","../../src/app/components/chart/primeng-chart.ts"],"sourcesContent":["import {NgModule,Component,ElementRef,AfterViewInit,OnDestroy,Input,Output,EventEmitter,ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport Chart from 'chart.js/auto';\n\n@Component({\n selector: 'p-chart',\n template: `\n <div style=\"position:relative\" [style.width]=\"responsive && !width ? null : width\" [style.height]=\"responsive && !height ? null : height\">\n <canvas [attr.width]=\"responsive && !width ? null : width\" [attr.height]=\"responsive && !height ? null : height\" (click)=\"onCanvasClick($event)\"></canvas>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'class': 'p-element'\n }\n})\nexport class UIChart implements AfterViewInit, OnDestroy {\n\n @Input() type: string;\n\n @Input() plugins: any[] = [];\n\n @Input() width: string;\n\n @Input() height: string;\n\n @Input() responsive: boolean = true;\n\n @Output() onDataSelect: EventEmitter<any> = new EventEmitter();\n\n initialized: boolean;\n\n _data: any;\n\n _options: any = {};\n\n chart: any;\n\n constructor(public el: ElementRef) {}\n\n @Input() get data(): any {\n return this._data;\n }\n\n set data(val:any) {\n this._data = val;\n this.reinit();\n }\n\n @Input() get options(): any {\n return this._options;\n }\n\n set options(val:any) {\n this._options = val;\n this.reinit();\n }\n\n ngAfterViewInit() {\n this.initChart();\n this.initialized = true;\n }\n\n onCanvasClick(event) {\n if (this.chart) {\n const element = this.chart.getElementsAtEventForMode(event, 'nearest', { intersect: true }, false);\n const dataset = this.chart.getElementsAtEventForMode(event, 'dataset', { intersect: true }, false);\n\n if (element && element[0] && dataset) {\n this.onDataSelect.emit({originalEvent: event, element: element[0], dataset: dataset});\n }\n }\n }\n\n initChart() {\n let opts = this.options||{};\n opts.responsive = this.responsive;\n\n // allows chart to resize in responsive mode\n if (opts.responsive&&(this.height||this.width)) {\n opts.maintainAspectRatio = false;\n }\n\n this.chart = new Chart(this.el.nativeElement.children[0].children[0], {\n type: this.type,\n data: this.data,\n options: this.options,\n plugins: this.plugins\n });\n }\n\n getCanvas() {\n return this.el.nativeElement.children[0].children[0];\n }\n\n getBase64Image() {\n return this.chart.toBase64Image();\n }\n\n generateLegend() {\n if (this.chart) {\n return this.chart.generateLegend();\n }\n }\n\n refresh() {\n if (this.chart) {\n this.chart.update();\n }\n }\n\n reinit() {\n if (this.chart) {\n this.chart.destroy();\n this.initChart();\n }\n }\n\n ngOnDestroy() {\n if (this.chart) {\n this.chart.destroy();\n this.initialized = false;\n this.chart = null;\n }\n }\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [UIChart],\n declarations: [UIChart]\n})\nexport class ChartModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;MAiBa,OAAO;IAsBhB,YAAmB,EAAc;QAAd,OAAE,GAAF,EAAE,CAAY;QAlBxB,YAAO,GAAU,EAAE,CAAC;QAMpB,eAAU,GAAY,IAAI,CAAC;QAE1B,iBAAY,GAAsB,IAAI,YAAY,EAAE,CAAC;QAM/D,aAAQ,GAAQ,EAAE,CAAC;KAIkB;IAErC,IAAa,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;KACrB;IAED,IAAI,IAAI,CAAC,GAAO;QACZ,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QACjB,IAAI,CAAC,MAAM,EAAE,CAAC;KACjB;IAED,IAAa,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;KACxB;IAED,IAAI,OAAO,CAAC,GAAO;QACf,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACpB,IAAI,CAAC,MAAM,EAAE,CAAC;KACjB;IAED,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