@codeauradev/ngx-wind-charts 1.0.0 → 1.0.8

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.
@@ -93,7 +93,7 @@ var NgxChartFrame = class NgxChartFrame {
93
93
  <div class="ngx-tip" [style.left.px]="tip.x" [style.top.px]="tip.y">
94
94
  <div class="font-medium">{{ tip.title }}</div>
95
95
  @for (row of tip.rows; track row.label) {
96
- <div class="ngx-key mt-1">
96
+ <div class="ngx-tip-row">
97
97
  <span class="ngx-swatch" [style.background]="row.swatch"></span>
98
98
  <span>{{ row.label }}</span>
99
99
  <span class="ml-auto pl-3 font-medium text-foreground">{{ row.value }}</span>
@@ -141,7 +141,7 @@ var NgxChartFrame = class NgxChartFrame {
141
141
  </figure>
142
142
  `,
143
143
  isInline: true,
144
- styles: [":host{display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0}\n"],
144
+ styles: [":host{display:flex;flex-direction:column;box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:0;height:100%}\n"],
145
145
  changeDetection: i0.ChangeDetectionStrategy.OnPush
146
146
  });
147
147
  };
@@ -166,7 +166,7 @@ i0.ɵɵngDeclareClassMetadata({
166
166
  <div class="ngx-tip" [style.left.px]="tip.x" [style.top.px]="tip.y">
167
167
  <div class="font-medium">{{ tip.title }}</div>
168
168
  @for (row of tip.rows; track row.label) {
169
- <div class="ngx-key mt-1">
169
+ <div class="ngx-tip-row">
170
170
  <span class="ngx-swatch" [style.background]="row.swatch"></span>
171
171
  <span>{{ row.label }}</span>
172
172
  <span class="ml-auto pl-3 font-medium text-foreground">{{ row.value }}</span>
@@ -213,7 +213,7 @@ i0.ɵɵngDeclareClassMetadata({
213
213
  </table>
214
214
  </figure>
215
215
  `,
216
- styles: [":host{display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0}\n"]
216
+ styles: [":host{display:flex;flex-direction:column;box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:0;height:100%}\n"]
217
217
  }]
218
218
  }],
219
219
  propDecorators: {
@@ -59674,16 +59674,22 @@ function chartBox(preferred, initialWidth = 640) {
59674
59674
  const destroyRef = inject(DestroyRef);
59675
59675
  const width = signal(initialWidth, ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
59676
59676
  const height = signal(Math.max(1, preferred()), ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
59677
- effect(() => height.set(Math.max(1, preferred())));
59677
+ let measure = () => height.set(Math.max(1, preferred()));
59678
+ effect(() => {
59679
+ preferred();
59680
+ measure();
59681
+ });
59678
59682
  afterNextRender(() => {
59679
59683
  const root = host.nativeElement;
59680
- const measure = () => {
59684
+ measure = () => {
59685
+ const preferredH = Math.max(1, preferred());
59681
59686
  const nextW = root.clientWidth;
59682
59687
  if (nextW > 0) width.set(Math.round(nextW));
59688
+ height.set(preferredH);
59683
59689
  };
59684
59690
  measure();
59685
59691
  if (typeof ResizeObserver === "undefined") return;
59686
- const observer = new ResizeObserver(measure);
59692
+ const observer = new ResizeObserver(() => measure());
59687
59693
  observer.observe(root);
59688
59694
  destroyRef.onDestroy(() => observer.disconnect());
59689
59695
  });