intelica-library-ui 0.1.106 → 0.1.108

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.
@@ -2612,6 +2612,7 @@ class EchartComponent {
2612
2612
  platformId;
2613
2613
  config;
2614
2614
  id;
2615
+ renderer = "canvas";
2615
2616
  containerStyle = {
2616
2617
  width: "100%",
2617
2618
  height: "400px",
@@ -2647,7 +2648,7 @@ class EchartComponent {
2647
2648
  }
2648
2649
  initChart(chartElement) {
2649
2650
  const observer = new ResizeObserver(() => this.resize());
2650
- this.chart = echarts.init(chartElement);
2651
+ this.chart = echarts.init(chartElement, null, { renderer: this.renderer });
2651
2652
  this.chart.setOption(this.config);
2652
2653
  this.chart.on("click", params => {
2653
2654
  this.event.emit(params);
@@ -2655,7 +2656,7 @@ class EchartComponent {
2655
2656
  observer.observe(chartElement);
2656
2657
  }
2657
2658
  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 });
2658
- 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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
2659
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: EchartComponent, isStandalone: true, selector: "intelica-echart", inputs: { config: "config", id: "id", renderer: "renderer", 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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
2659
2660
  }
2660
2661
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EchartComponent, decorators: [{
2661
2662
  type: Component,
@@ -2667,6 +2668,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
2667
2668
  type: Input
2668
2669
  }], id: [{
2669
2670
  type: Input
2671
+ }], renderer: [{
2672
+ type: Input
2670
2673
  }], containerStyle: [{
2671
2674
  type: Input
2672
2675
  }], event: [{
@@ -3450,10 +3453,14 @@ class EchartService {
3450
3453
  * @returns - Tooltip HTML string
3451
3454
  */
3452
3455
  getTooltipFormatter(color, title, body) {
3453
- return `
3454
- <div style="font-size: 12px; color: ${color}; border-radius: 6px; min-width: 120px; text-align: center;">
3456
+ const titleHtml = title.length > 0
3457
+ ? `
3455
3458
  <b style=" font-size: 13px;">${title} </b><br>
3456
- <hr style="border: 1px solid ${color}; margin: 4px 0;">
3459
+ <hr style="border: 1px solid ${color}; margin: 4px 0;">`
3460
+ : "";
3461
+ return `
3462
+ <div style="font-size: 12px; boder-color: ${color}; color: ${color}; border-radius: 6px; min-width: 120px; text-align: center;">
3463
+ ${titleHtml}
3457
3464
  ${body}
3458
3465
  </div>
3459
3466
  `;
@@ -3479,7 +3486,7 @@ class EchartService {
3479
3486
  name: item.name,
3480
3487
  itemStyle: { color: item.color },
3481
3488
  data: item.value,
3482
- barWidth: "25%",
3489
+ // barWidth: "33%",
3483
3490
  barGap: "0%",
3484
3491
  label: {
3485
3492
  show: true,
@@ -3513,8 +3520,8 @@ class EchartService {
3513
3520
  getBarChartStackOptions(categories, series, labelConfig, tooltipConfig, showLegend = false) {
3514
3521
  let barBase = this.getBarChartOptions(categories, series, labelConfig, tooltipConfig, showLegend);
3515
3522
  barBase.series.forEach((serie, index) => {
3516
- serie.barWidth = "50%";
3517
- serie.barGap = "0%";
3523
+ // serie.barWidth = "50%";
3524
+ // serie.barGap = "0%";
3518
3525
  serie.barCategoryGap = "10%";
3519
3526
  serie.stack = "total";
3520
3527
  if (index < series.length - 1) {
@@ -3561,8 +3568,8 @@ class EchartService {
3561
3568
  getBarChartHorizontalStackOptions(categories, series, labelConfig, tooltipConfig, showLegend = false) {
3562
3569
  let barBase = this.getBarChartHorizontalOptions(categories, series, labelConfig, tooltipConfig, showLegend);
3563
3570
  barBase.series.forEach((serie, index) => {
3564
- serie.barWidth = "50%";
3565
- serie.barGap = "0%";
3571
+ // serie.barWidth = "50%";
3572
+ // serie.barGap = "0%";
3566
3573
  serie.barCategoryGap = "10%";
3567
3574
  serie.stack = "total";
3568
3575
  if (serie.label) {
@@ -3608,7 +3615,7 @@ class EchartService {
3608
3615
  barBase.grid.containLabel = true;
3609
3616
  }
3610
3617
  barBase.series.forEach((serie, index) => {
3611
- serie.barWidth = "75%";
3618
+ // serie.barWidth = "75%";
3612
3619
  });
3613
3620
  return barBase;
3614
3621
  }