intelica-library-ui 0.1.73 → 0.1.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2467,6 +2467,10 @@ class EchartComponent {
2467
2467
  platformId;
2468
2468
  config;
2469
2469
  id;
2470
+ containerStyle = {
2471
+ width: "100%",
2472
+ height: "400px",
2473
+ };
2470
2474
  event = new EventEmitter();
2471
2475
  chart;
2472
2476
  constructor(el, platformId) {
@@ -2476,16 +2480,13 @@ class EchartComponent {
2476
2480
  ngAfterViewInit() {
2477
2481
  const chartElement = this.el.nativeElement.querySelector(`#${this.id}_plot`);
2478
2482
  if (!this.config) {
2479
- console.log('Set chart configuration');
2480
- return;
2483
+ throw new Error("Chart configuration is not set");
2481
2484
  }
2482
2485
  if (!isPlatformBrowser(this.platformId)) {
2483
- console.log('Not Browser platform');
2484
- return;
2486
+ throw new Error("Platform is not browser");
2485
2487
  }
2486
2488
  if (!chartElement) {
2487
- console.log('Plot area not found');
2488
- return;
2489
+ throw new Error("Plot area not found");
2489
2490
  }
2490
2491
  this.initChart(chartElement);
2491
2492
  }
@@ -2495,16 +2496,16 @@ class EchartComponent {
2495
2496
  initChart(chartElement) {
2496
2497
  this.chart = echarts.init(chartElement);
2497
2498
  this.chart.setOption(this.config);
2498
- this.chart.on('click', (params) => {
2499
+ this.chart.on("click", params => {
2499
2500
  this.event.emit(params);
2500
2501
  });
2501
2502
  }
2502
2503
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EchartComponent, deps: [{ token: i0.ElementRef }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
2503
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: EchartComponent, isStandalone: true, selector: "intelica-echart", inputs: { config: "config", id: "id" }, outputs: { event: "event" }, ngImport: i0, template: "<div [id]=\"id + '_plot'\" class=\"chart\" style=\"width: 100%; height: 400px\"></div>\r\n" });
2504
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: EchartComponent, isStandalone: true, selector: "intelica-echart", inputs: { config: "config", id: "id", containerStyle: "containerStyle" }, outputs: { event: "event" }, ngImport: i0, template: "<div [id]=\"id + '_plot'\" class=\"chart\" [ngStyle]=\"containerStyle\"></div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
2504
2505
  }
2505
2506
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EchartComponent, decorators: [{
2506
2507
  type: Component,
2507
- args: [{ selector: 'intelica-echart', imports: [], template: "<div [id]=\"id + '_plot'\" class=\"chart\" style=\"width: 100%; height: 400px\"></div>\r\n" }]
2508
+ args: [{ selector: "intelica-echart", imports: [CommonModule], template: "<div [id]=\"id + '_plot'\" class=\"chart\" [ngStyle]=\"containerStyle\"></div>\r\n" }]
2508
2509
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: Object, decorators: [{
2509
2510
  type: Inject,
2510
2511
  args: [PLATFORM_ID]
@@ -2512,6 +2513,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
2512
2513
  type: Input
2513
2514
  }], id: [{
2514
2515
  type: Input
2516
+ }], containerStyle: [{
2517
+ type: Input
2515
2518
  }], event: [{
2516
2519
  type: Output
2517
2520
  }] } });