@pioneer-code/pioneer-charts 22.2.3 → 22.2.4

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.
@@ -284,7 +284,7 @@ class PcacAxisBuilder {
284
284
  });
285
285
  break;
286
286
  case PcacFormatEnum.Decimal:
287
- xAxis.tickFormat((d) => format(".2s")(d));
287
+ xAxis.tickFormat(decimalTickFormat(config.xScale, config.xAxis.ticks));
288
288
  break;
289
289
  }
290
290
  const group = config.svg.append('g')
@@ -331,15 +331,29 @@ class PcacAxisBuilder {
331
331
  text('pcac-axis-sub-label', layout.length, edge, 'end', sub.max);
332
332
  }
333
333
  }
334
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacAxisBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
335
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacAxisBuilder, providedIn: 'root' });
334
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacAxisBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
335
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacAxisBuilder, providedIn: 'root' });
336
336
  }
337
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacAxisBuilder, decorators: [{
337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacAxisBuilder, decorators: [{
338
338
  type: Injectable,
339
339
  args: [{
340
340
  providedIn: 'root',
341
341
  }]
342
342
  }] });
343
+ /**
344
+ * Tick labels for a `Decimal` axis: SI-prefixed (`1.5k`), with the precision taken from the
345
+ * scale's own tick step rather than fixed. A fixed two significant digits (`.2s`) is fine for a
346
+ * whole domain but breaks down once zoom narrows it to a few units - ticks at 10.5, 11, 11.5, 12
347
+ * all rounded to `10 11 12 12`. `~` trims trailing zeros so a coarse step still reads `5 10 15`,
348
+ * not `5.0 10.0 15.0`. Falls back to the fixed format for a scale without `tickFormat` (a
349
+ * `Decimal` axis is always linear in practice, but the config type only promises `AxisScale`).
350
+ */
351
+ function decimalTickFormat(scale, ticks) {
352
+ const withTicks = scale;
353
+ const formatTick = withTicks.tickFormat ? withTicks.tickFormat(ticks, '~s') : (d) => format('.2s')(d);
354
+ // The prefix comes from the domain's largest value, which would label the origin `0k`.
355
+ return (d) => (Number(d) === 0 ? '0' : formatTick(d));
356
+ }
343
357
 
344
358
  /** Where along its axis each grid line sits, in pixels. */
345
359
  function gridLines(scale, numberOfTicks) {
@@ -386,10 +400,10 @@ class PcacGridBuilder {
386
400
  .attr('x2', config.width)
387
401
  .attr('class', (_, i) => (i === 0 ? 'pcac-grid-rule-last' : ''));
388
402
  }
389
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacGridBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
390
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacGridBuilder, providedIn: 'root' });
403
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacGridBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
404
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacGridBuilder, providedIn: 'root' });
391
405
  }
392
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacGridBuilder, decorators: [{
406
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacGridBuilder, decorators: [{
393
407
  type: Injectable,
394
408
  args: [{
395
409
  providedIn: 'root',
@@ -456,10 +470,10 @@ class PcacColorService {
456
470
  setAlert(color) {
457
471
  this.alert = color;
458
472
  }
459
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacColorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
460
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacColorService, providedIn: 'root' });
473
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacColorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
474
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacColorService, providedIn: 'root' });
461
475
  }
462
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacColorService, decorators: [{
476
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacColorService, decorators: [{
463
477
  type: Injectable,
464
478
  args: [{
465
479
  providedIn: 'root',
@@ -471,10 +485,10 @@ class PcacTransitionService {
471
485
  getTransitionDuration() {
472
486
  return this.transitionDuration;
473
487
  }
474
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacTransitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
475
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacTransitionService, providedIn: 'root' });
488
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacTransitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
489
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacTransitionService, providedIn: 'root' });
476
490
  }
477
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacTransitionService, decorators: [{
491
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacTransitionService, decorators: [{
478
492
  type: Injectable,
479
493
  args: [{
480
494
  providedIn: 'root',
@@ -608,10 +622,10 @@ class PcacTooltipBuilder {
608
622
  const finalValue = value ? value.toString() : value;
609
623
  return key ? key + '<br>' + finalValue : `${finalValue}`;
610
624
  }
611
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacTooltipBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
612
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacTooltipBuilder, providedIn: 'root' });
625
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacTooltipBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
626
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacTooltipBuilder, providedIn: 'root' });
613
627
  }
614
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacTooltipBuilder, decorators: [{
628
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacTooltipBuilder, decorators: [{
615
629
  type: Injectable,
616
630
  args: [{
617
631
  providedIn: 'root',
@@ -1243,10 +1257,10 @@ class BarHorizontalChartBuilder extends PcacChart {
1243
1257
  this.hideTooltip();
1244
1258
  });
1245
1259
  }
1246
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: BarHorizontalChartBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1247
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: BarHorizontalChartBuilder });
1260
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: BarHorizontalChartBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1261
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: BarHorizontalChartBuilder });
1248
1262
  }
1249
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: BarHorizontalChartBuilder, decorators: [{
1263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: BarHorizontalChartBuilder, decorators: [{
1250
1264
  type: Injectable
1251
1265
  }] });
1252
1266
 
@@ -1299,10 +1313,10 @@ class PcacChartResizeService {
1299
1313
  destroyRef.onDestroy(() => observer.disconnect());
1300
1314
  });
1301
1315
  }
1302
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacChartResizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1303
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacChartResizeService, providedIn: 'root' });
1316
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacChartResizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1317
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacChartResizeService, providedIn: 'root' });
1304
1318
  }
1305
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacChartResizeService, decorators: [{
1319
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacChartResizeService, decorators: [{
1306
1320
  type: Injectable,
1307
1321
  args: [{ providedIn: 'root' }]
1308
1322
  }] });
@@ -1352,10 +1366,10 @@ class PcacTooltipDirective {
1352
1366
  static ngTemplateContextGuard(_dir, _ctx) {
1353
1367
  return true;
1354
1368
  }
1355
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1356
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: PcacTooltipDirective, isStandalone: true, selector: "ng-template[pcacTooltip]", ngImport: i0 });
1369
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1370
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: PcacTooltipDirective, isStandalone: true, selector: "ng-template[pcacTooltip]", ngImport: i0 });
1357
1371
  }
1358
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacTooltipDirective, decorators: [{
1372
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacTooltipDirective, decorators: [{
1359
1373
  type: Directive,
1360
1374
  args: [{
1361
1375
  selector: 'ng-template[pcacTooltip]'
@@ -1398,10 +1412,10 @@ class PcacBarHorizontalChartComponent {
1398
1412
  this.chartBuilder.buildChart(this.chartElm(), config);
1399
1413
  }
1400
1414
  }
1401
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacBarHorizontalChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1402
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: PcacBarHorizontalChartComponent, isStandalone: true, selector: "pcac-bar-horizontal-chart", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { barClicked: "barClicked" }, host: { properties: { "class.pcac-height-full": "config().heightFull" } }, providers: [BarHorizontalChartBuilder], queries: [{ propertyName: "tooltipTemplate", first: true, predicate: PcacTooltipDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "chartElm", first: true, predicate: ["chart"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"pcac-bar-horizontal-chart\">\n <svg #chart></svg>\n</section>\n", styles: [".pcac-bar-horizontal-chart{display:block}.pcac-bar-horizontal-chart svg{width:100%;display:block}pcac-bar-horizontal-chart.pcac-height-full{display:block;height:100%}pcac-bar-horizontal-chart.pcac-height-full .pcac-bar-horizontal-chart{height:100%}\n"], encapsulation: i0.ViewEncapsulation.None });
1415
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacBarHorizontalChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1416
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: PcacBarHorizontalChartComponent, isStandalone: true, selector: "pcac-bar-horizontal-chart", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { barClicked: "barClicked" }, host: { properties: { "class.pcac-height-full": "config().heightFull" } }, providers: [BarHorizontalChartBuilder], queries: [{ propertyName: "tooltipTemplate", first: true, predicate: PcacTooltipDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "chartElm", first: true, predicate: ["chart"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"pcac-bar-horizontal-chart\">\n <svg #chart></svg>\n</section>\n", styles: [".pcac-bar-horizontal-chart{display:block}.pcac-bar-horizontal-chart svg{width:100%;display:block}pcac-bar-horizontal-chart.pcac-height-full{display:block;height:100%}pcac-bar-horizontal-chart.pcac-height-full .pcac-bar-horizontal-chart{height:100%}\n"], encapsulation: i0.ViewEncapsulation.None });
1403
1417
  }
1404
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacBarHorizontalChartComponent, decorators: [{
1418
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacBarHorizontalChartComponent, decorators: [{
1405
1419
  type: Component,
1406
1420
  args: [{ selector: 'pcac-bar-horizontal-chart', host: { '[class.pcac-height-full]': 'config().heightFull' }, encapsulation: ViewEncapsulation.None, providers: [BarHorizontalChartBuilder], template: "<section class=\"pcac-bar-horizontal-chart\">\n <svg #chart></svg>\n</section>\n", styles: [".pcac-bar-horizontal-chart{display:block}.pcac-bar-horizontal-chart svg{width:100%;display:block}pcac-bar-horizontal-chart.pcac-height-full{display:block;height:100%}pcac-bar-horizontal-chart.pcac-height-full .pcac-bar-horizontal-chart{height:100%}\n"] }]
1407
1421
  }], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], chartElm: [{ type: i0.ViewChild, args: ['chart', { isSignal: true }] }], barClicked: [{ type: i0.Output, args: ["barClicked"] }], tooltipTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PcacTooltipDirective), { isSignal: true }] }] } });
@@ -1669,10 +1683,10 @@ class BarVerticalChartBuilder extends PcacChart {
1669
1683
  return '3px';
1670
1684
  });
1671
1685
  }
1672
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: BarVerticalChartBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1673
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: BarVerticalChartBuilder });
1686
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: BarVerticalChartBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1687
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: BarVerticalChartBuilder });
1674
1688
  }
1675
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: BarVerticalChartBuilder, decorators: [{
1689
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: BarVerticalChartBuilder, decorators: [{
1676
1690
  type: Injectable
1677
1691
  }] });
1678
1692
 
@@ -1712,10 +1726,10 @@ class PcacBarVerticalChartComponent {
1712
1726
  this.chartBuilder.buildChart(this.chartElm(), config);
1713
1727
  }
1714
1728
  }
1715
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacBarVerticalChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1716
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: PcacBarVerticalChartComponent, isStandalone: true, selector: "pcac-bar-vertical-chart", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { barClicked: "barClicked" }, host: { properties: { "class.pcac-height-full": "config().heightFull" } }, providers: [BarVerticalChartBuilder], queries: [{ propertyName: "tooltipTemplate", first: true, predicate: PcacTooltipDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "chartElm", first: true, predicate: ["chart"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"pcac-bar-vertical-chart\">\n <svg #chart></svg>\n</section>\n", styles: [".pcac-bar-vertical-chart svg{width:100%;display:block}pcac-bar-vertical-chart.pcac-height-full{display:block;height:100%}pcac-bar-vertical-chart.pcac-height-full .pcac-bar-vertical-chart{height:100%}\n"], encapsulation: i0.ViewEncapsulation.None });
1729
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacBarVerticalChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1730
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: PcacBarVerticalChartComponent, isStandalone: true, selector: "pcac-bar-vertical-chart", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { barClicked: "barClicked" }, host: { properties: { "class.pcac-height-full": "config().heightFull" } }, providers: [BarVerticalChartBuilder], queries: [{ propertyName: "tooltipTemplate", first: true, predicate: PcacTooltipDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "chartElm", first: true, predicate: ["chart"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"pcac-bar-vertical-chart\">\n <svg #chart></svg>\n</section>\n", styles: [".pcac-bar-vertical-chart svg{width:100%;display:block}pcac-bar-vertical-chart.pcac-height-full{display:block;height:100%}pcac-bar-vertical-chart.pcac-height-full .pcac-bar-vertical-chart{height:100%}\n"], encapsulation: i0.ViewEncapsulation.None });
1717
1731
  }
1718
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacBarVerticalChartComponent, decorators: [{
1732
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacBarVerticalChartComponent, decorators: [{
1719
1733
  type: Component,
1720
1734
  args: [{ selector: 'pcac-bar-vertical-chart', host: { '[class.pcac-height-full]': 'config().heightFull' }, encapsulation: ViewEncapsulation.None, providers: [BarVerticalChartBuilder], template: "<section class=\"pcac-bar-vertical-chart\">\n <svg #chart></svg>\n</section>\n", styles: [".pcac-bar-vertical-chart svg{width:100%;display:block}pcac-bar-vertical-chart.pcac-height-full{display:block;height:100%}pcac-bar-vertical-chart.pcac-height-full .pcac-bar-vertical-chart{height:100%}\n"] }]
1721
1735
  }], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], chartElm: [{ type: i0.ViewChild, args: ['chart', { isSignal: true }] }], barClicked: [{ type: i0.Output, args: ["barClicked"] }], tooltipTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PcacTooltipDirective), { isSignal: true }] }] } });
@@ -1751,10 +1765,10 @@ class PcacLegend {
1751
1765
  this.config.set({ ...this.config(), items });
1752
1766
  this.itemClicked.emit(items);
1753
1767
  }
1754
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacLegend, deps: [], target: i0.ɵɵFactoryTarget.Component });
1755
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: PcacLegend, isStandalone: true, selector: "pcac-legend", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { config: "configChange", itemClicked: "itemClicked" }, ngImport: i0, template: "<div class=\"pcac-legend-label\"><small>{{config().heading}}</small></div>\n@for(item of config().items; track $index; let i = $index; let last = $last;) {\n<div class=\"pcac-legend-item\" [class.pcac-legend-item-last]=\"last\" [class.pcac-legend-unchecked]=\"!item.checked\"\n role=\"switch\" [attr.aria-checked]=\"item.checked\" tabindex=\"0\" (click)=\"onItemClicked(i)\"\n (keydown.enter)=\"onItemClicked(i)\" (keydown.space)=\"onItemClicked(i); $event.preventDefault()\">\n @let color = item.colorOverride ? item.colorOverride : colorScale()[i];\n <div class=\"pcac-legend-circle\" [style.backgroundColor]=\"color\"></div>\n <small>{{ item.label }}</small>\n</div>\n}\n", styles: [":host{display:flex;align-items:center}.pcac-legend-label{margin-right:8px;margin-bottom:2.5px}.pcac-legend-item{cursor:pointer;display:flex;align-items:center;margin-right:8px}.pcac-legend-item:hover .pcac-legend-circle{box-shadow:0 0 6px #0000004d;transform:scale(1.2)}.pcac-legend-circle{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:4px;transition:box-shadow .3s ease,transform .3s ease}.pcac-legend-unchecked{opacity:.5}.pcac-legend-item-last{margin-right:0}.pcac-legend-item:focus-visible{outline:2px solid currentColor;outline-offset:2px}\n"] });
1768
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacLegend, deps: [], target: i0.ɵɵFactoryTarget.Component });
1769
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: PcacLegend, isStandalone: true, selector: "pcac-legend", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { config: "configChange", itemClicked: "itemClicked" }, ngImport: i0, template: "<div class=\"pcac-legend-label\"><small>{{config().heading}}</small></div>\n@for(item of config().items; track $index; let i = $index; let last = $last;) {\n<div class=\"pcac-legend-item\" [class.pcac-legend-item-last]=\"last\" [class.pcac-legend-unchecked]=\"!item.checked\"\n role=\"switch\" [attr.aria-checked]=\"item.checked\" tabindex=\"0\" (click)=\"onItemClicked(i)\"\n (keydown.enter)=\"onItemClicked(i)\" (keydown.space)=\"onItemClicked(i); $event.preventDefault()\">\n @let color = item.colorOverride ? item.colorOverride : colorScale()[i];\n <div class=\"pcac-legend-circle\" [style.backgroundColor]=\"color\"></div>\n <small>{{ item.label }}</small>\n</div>\n}\n", styles: [":host{display:flex;align-items:center}.pcac-legend-label{margin-right:8px;margin-bottom:2.5px}.pcac-legend-item{cursor:pointer;display:flex;align-items:center;margin-right:8px}.pcac-legend-item:hover .pcac-legend-circle{box-shadow:0 0 6px #0000004d;transform:scale(1.2)}.pcac-legend-circle{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:4px;transition:box-shadow .3s ease,transform .3s ease}.pcac-legend-unchecked{opacity:.5}.pcac-legend-item-last{margin-right:0}.pcac-legend-item:focus-visible{outline:2px solid currentColor;outline-offset:2px}\n"] });
1756
1770
  }
1757
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacLegend, decorators: [{
1771
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacLegend, decorators: [{
1758
1772
  type: Component,
1759
1773
  args: [{ selector: 'pcac-legend', template: "<div class=\"pcac-legend-label\"><small>{{config().heading}}</small></div>\n@for(item of config().items; track $index; let i = $index; let last = $last;) {\n<div class=\"pcac-legend-item\" [class.pcac-legend-item-last]=\"last\" [class.pcac-legend-unchecked]=\"!item.checked\"\n role=\"switch\" [attr.aria-checked]=\"item.checked\" tabindex=\"0\" (click)=\"onItemClicked(i)\"\n (keydown.enter)=\"onItemClicked(i)\" (keydown.space)=\"onItemClicked(i); $event.preventDefault()\">\n @let color = item.colorOverride ? item.colorOverride : colorScale()[i];\n <div class=\"pcac-legend-circle\" [style.backgroundColor]=\"color\"></div>\n <small>{{ item.label }}</small>\n</div>\n}\n", styles: [":host{display:flex;align-items:center}.pcac-legend-label{margin-right:8px;margin-bottom:2.5px}.pcac-legend-item{cursor:pointer;display:flex;align-items:center;margin-right:8px}.pcac-legend-item:hover .pcac-legend-circle{box-shadow:0 0 6px #0000004d;transform:scale(1.2)}.pcac-legend-circle{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:4px;transition:box-shadow .3s ease,transform .3s ease}.pcac-legend-unchecked{opacity:.5}.pcac-legend-item-last{margin-right:0}.pcac-legend-item:focus-visible{outline:2px solid currentColor;outline-offset:2px}\n"] }]
1760
1774
  }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }, { type: i0.Output, args: ["configChange"] }], itemClicked: [{ type: i0.Output, args: ["itemClicked"] }] } });
@@ -1951,10 +1965,10 @@ class PlaChartEffectsBuilder {
1951
1965
  return 'translate(' + mousePos[0] + ',' + pos.y + ')';
1952
1966
  });
1953
1967
  }
1954
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PlaChartEffectsBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1955
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PlaChartEffectsBuilder });
1968
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PlaChartEffectsBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1969
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PlaChartEffectsBuilder });
1956
1970
  }
1957
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PlaChartEffectsBuilder, decorators: [{
1971
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PlaChartEffectsBuilder, decorators: [{
1958
1972
  type: Injectable
1959
1973
  }] });
1960
1974
 
@@ -1962,7 +1976,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
1962
1976
  * How the plot chart spreads out points that share a coordinate (see
1963
1977
  * `PcacPlotChartConfig.pointFanOut`). Each group of coincident points is placed evenly around
1964
1978
  * a ring centered on the shared coordinate, starting at 12 o'clock and going clockwise in data
1965
- * order (series order, then point order), so every point stays visible and hoverable.
1979
+ * order (series order, then point order), so every point stays visible and hoverable. A ring at
1980
+ * the edge of the domain is moved back inside the plot area as one, so no member hangs over an
1981
+ * axis by more than half its mark - the same as a lone point there; the anchor stays put.
1966
1982
  */
1967
1983
  class PcacPointFanOutConfig {
1968
1984
  /**
@@ -2036,16 +2052,24 @@ class PlaChartScalesBuilder {
2036
2052
  }
2037
2053
  }
2038
2054
 
2055
+ /**
2056
+ * Whether a point has an x key to position by. An explicit emptiness check, not truthiness: a
2057
+ * Decimal key of `0` is a perfectly good coordinate (the left edge of a `domainMin: 0` axis) and
2058
+ * used to be read as "no key" - drawn at pixel 0 whatever the domain, and pinned there under zoom.
2059
+ */
2060
+ function hasKey(data) {
2061
+ return data.key !== null && data.key !== undefined && data.key !== '';
2062
+ }
2039
2063
  function getXFormat(type, data, index, xScale) {
2040
2064
  switch (type) {
2041
2065
  case PcacFormatEnum.DateTime:
2042
- if (data.key) {
2066
+ if (hasKey(data)) {
2043
2067
  return xScale(new Date(data.key));
2044
2068
  }
2045
2069
  return 0;
2046
2070
  case PcacFormatEnum.Decimal:
2047
- if (data.key) {
2048
- return xScale(data.key);
2071
+ if (hasKey(data)) {
2072
+ return xScale(Number(data.key));
2049
2073
  }
2050
2074
  return 0;
2051
2075
  default:
@@ -2126,9 +2150,9 @@ function findCoincidentGroups(series, xFormat) {
2126
2150
  function xPositionKey(xFormat, data, index) {
2127
2151
  switch (xFormat) {
2128
2152
  case PcacFormatEnum.DateTime:
2129
- return data.key ? new Date(data.key).getTime() : 'none';
2153
+ return hasKey(data) ? new Date(data.key).getTime() : 'none';
2130
2154
  case PcacFormatEnum.Decimal:
2131
- return data.key ? Number(data.key) : 'none';
2155
+ return hasKey(data) ? Number(data.key) : 'none';
2132
2156
  default:
2133
2157
  return index;
2134
2158
  }
@@ -2163,6 +2187,40 @@ function fanOutOffsets(groups, radius) {
2163
2187
  function round(value) {
2164
2188
  return Math.round(value * 100) / 100;
2165
2189
  }
2190
+ /**
2191
+ * How far to move a whole fanned-out ring so that none of its members' centers leave the plot
2192
+ * area - so a member at the edge of the domain hangs over the axis by at most half its mark,
2193
+ * exactly as a lone point at that coordinate would, rather than by half its mark plus the ring's
2194
+ * radius. The ring moves as one (its members keep their spacing) and the anchor stays put, so the
2195
+ * spokes simply get longer on the side that was pushed back. Per axis: if the ring pokes out past
2196
+ * 0 it comes back by that much, else if it pokes out past the far edge it comes back by that; a
2197
+ * ring too big to fit is kept in at the axis end, where the origin is.
2198
+ *
2199
+ * `anchor` is clamped to the plot area first, so once zoom carries a group's coordinate out of the
2200
+ * domain its members follow it out at the same pace instead of staying pinned to the edge (or
2201
+ * snapping the ring's radius the moment the anchor crosses): at the edge the correction is exactly
2202
+ * the outermost member's offset, and stays so beyond it.
2203
+ */
2204
+ function fanOutShift(anchor, offsets, plot) {
2205
+ const dxs = offsets.map((o) => o.dx);
2206
+ const dys = offsets.map((o) => o.dy);
2207
+ return {
2208
+ dx: axisShift(clamp(anchor.x, 0, plot.width), Math.min(...dxs), Math.max(...dxs), plot.width),
2209
+ dy: axisShift(clamp(anchor.y, 0, plot.height), Math.min(...dys), Math.max(...dys), plot.height),
2210
+ };
2211
+ }
2212
+ function axisShift(anchor, min, max, size) {
2213
+ if (anchor + min < 0) {
2214
+ return round(-(anchor + min));
2215
+ }
2216
+ if (anchor + max > size) {
2217
+ return round(size - (anchor + max));
2218
+ }
2219
+ return 0;
2220
+ }
2221
+ function clamp(value, min, max) {
2222
+ return Math.min(Math.max(value, min), max);
2223
+ }
2166
2224
 
2167
2225
  /**
2168
2226
  * Provided per-component (see PcacLineAreaChartComponent's `providers`), not root-scoped: this
@@ -2170,6 +2228,8 @@ function round(value) {
2170
2228
  * height, colors, svg). A root singleton would be shared and clobbered by every
2171
2229
  * <pcac-line-area-chart> rendered at once.
2172
2230
  */
2231
+ /** Half the theme's 2px line stroke: how far the lines/areas/fan-outs clip-path reaches past the plot. */
2232
+ const PLOT_CLIP_ALLOWANCE = 1;
2173
2233
  class PlaChartBuilder extends PcacChart {
2174
2234
  effectsBuilder = inject(PlaChartEffectsBuilder);
2175
2235
  scales;
@@ -2180,26 +2240,34 @@ class PlaChartBuilder extends PcacChart {
2180
2240
  config;
2181
2241
  clipPathId; // <-- added
2182
2242
  /**
2183
- * How far the clip-path rect extends past the drawable [0, width] x [0, height] area on every
2184
- * side, so a point sitting exactly on the domain's edge isn't cut in half. 10px comfortably
2185
- * clears a dot (r = 4, or 6 on hover); a point image can be much bigger than that, so
2186
- * buildChart() widens this to half the largest image dimension whenever any point has one
2187
- * (and grows the margins to match - see `reservePointImageSpace()` - since the clip-path only
2188
- * matters up to the edge of the SVG).
2243
+ * A second clip-path for everything that isn't a point - lines, areas, fan-out anchors and
2244
+ * spokes: the plot area plus `PLOT_CLIP_ALLOWANCE`. These have no business past the axes; the
2245
+ * points' buffer below used to apply to them too, so a line chart with big point images had
2246
+ * its lines run on half an image past the axes once zoomed.
2247
+ */
2248
+ plotClipPathId;
2249
+ /**
2250
+ * How far the points' clip-path rect extends past the drawable [0, width] x [0, height] area on
2251
+ * every side, so a point sitting exactly on the domain's edge isn't cut in half. 10px
2252
+ * comfortably clears a dot (r = 4, or 6 on hover); a point image can be much bigger than that,
2253
+ * so buildChart() widens this to half the largest image dimension whenever any point has one
2254
+ * (and grows the margins to match - see `reservePointSpace()` - since the clip-path only
2255
+ * matters up to the edge of the SVG). The buffer is only there for points whose center is
2256
+ * inside the plot; one whose center zoom has carried past an edge is hidden outright (see
2257
+ * `pointVisible`), rather than left showing up to a whole half-mark beyond the axis.
2189
2258
  */
2190
2259
  clipBuffer = 10;
2191
2260
  pointImage;
2192
2261
  /**
2193
2262
  * Points that share a coordinate, found by `resolvePointLayout()`. `coincidentOf` looks a
2194
- * point's group up for its tooltip; the rest only matter when `fanOut` is on (plot chart with
2195
- * `pointFanOut`): `fanOutOffsets` is where each member is drawn relative to its true position,
2196
- * and `fanOutReach` how far the farthest one sits from it, for the edge space to reserve.
2263
+ * point's group up for its tooltip and for its ring's shift (see `fanOutShift`); `fanOutOffsets`
2264
+ * only matters when `fanOut` is on (plot chart with `pointFanOut`) and is where each member sits
2265
+ * on its ring relative to the shared coordinate, before that shift.
2197
2266
  */
2198
2267
  coincidentGroups = [];
2199
2268
  coincidentOf = new Map();
2200
2269
  fanOut = null;
2201
2270
  fanOutOffsets = new Map();
2202
- fanOutReach = 0;
2203
2271
  dotClicked$ = this.dotClickedSource.asObservable();
2204
2272
  buildChart(chartElm, config, type) {
2205
2273
  if (!config?.data?.length) {
@@ -2263,10 +2331,16 @@ class PlaChartBuilder extends PcacChart {
2263
2331
  // (DatasetLength) positions by index, and a flat selection would number every series'
2264
2332
  // points consecutively, shoving the second series' points off to the right on zoom.
2265
2333
  this.svg.selectAll('.dots').selectAll('.point')
2266
- .attr('transform', (d, i) => this.pointTransform(d, i, zoomedScales));
2267
- // A fan-out's anchor is positioned like the points it belongs to, so it moves the same way.
2334
+ .attr('transform', (d, i) => this.pointTransform(d, i, zoomedScales))
2335
+ .attr('display', (d, i) => this.pointDisplay(d, i, zoomedScales));
2336
+ // A fan-out's anchor is positioned like the points it belongs to, so it moves the same way;
2337
+ // its spokes are re-aimed because the ring's shift back into the plot (`fanOutShift`)
2338
+ // depends on where the anchor now is.
2268
2339
  this.svg.selectAll('.fan-out')
2269
- .attr('transform', (g) => this.fanOutTransform(g, zoomedScales));
2340
+ .attr('transform', (g) => this.fanOutTransform(g, zoomedScales))
2341
+ .selectAll('.fan-out-spoke')
2342
+ .attr('x2', (member) => this.spokeEnd(member, zoomedScales).dx)
2343
+ .attr('y2', (member) => this.spokeEnd(member, zoomedScales).dy);
2270
2344
  // The hover crosshair walks the (already updated) line geometry, but reads its value back
2271
2345
  // off the y scale - which must be the zoomed one or the label is wrong.
2272
2346
  if (this.config.enableEffects) {
@@ -2308,8 +2382,7 @@ class PlaChartBuilder extends PcacChart {
2308
2382
  /**
2309
2383
  * Resolves `pointImage`, finds the points that share a coordinate and, on a plot chart with
2310
2384
  * `pointFanOut`, works out where to draw each of them instead. Coincidence is found from the
2311
- * data (see `findCoincidentGroups`) so this can run before the scales exist - it has to, as
2312
- * `reservePointSpace()` needs the fan-out's reach before the plot area is sized. Line and area
2385
+ * data (see `findCoincidentGroups`) so this can run before the scales exist. Line and area
2313
2386
  * charts still get the groups, for the tooltip's `coincident` list, but never an offset.
2314
2387
  */
2315
2388
  resolvePointLayout(type) {
@@ -2322,7 +2395,6 @@ class PlaChartBuilder extends PcacChart {
2322
2395
  if (!fanOut) {
2323
2396
  this.fanOut = null;
2324
2397
  this.fanOutOffsets = new Map();
2325
- this.fanOutReach = 0;
2326
2398
  return;
2327
2399
  }
2328
2400
  this.fanOut = { ...new PcacPointFanOutConfig(), ...fanOut };
@@ -2332,34 +2404,35 @@ class PlaChartBuilder extends PcacChart {
2332
2404
  const markSize = (group) => group.members.some((member) => !!member.data.image) ? Math.max(maxWidth, maxHeight) : 12;
2333
2405
  const radius = (group) => this.fanOut.radius ?? fanOutRadius(group.members.length, markSize(group), this.fanOut.gap);
2334
2406
  this.fanOutOffsets = fanOutOffsets(this.coincidentGroups, radius);
2335
- this.fanOutReach = Math.ceil(Math.max(0, ...this.coincidentGroups.map(radius)));
2336
2407
  }
2337
2408
  /**
2338
- * When any point has an `image`, or a fan-out has moved points off their coordinate, makes
2339
- * room for them at the edge of the domain: the clip-path buffer grows to half the box (plus
2340
- * the fan-out's reach) so the `.dots` group lets it through, and the margins grow to at least
2341
- * that same amount so the `<svg>` doesn't cut off what the clip-path let through (an image box
2342
- * is centered on its point, so at the top of the y domain half of it sits above the plot area
2343
- * - in `margin.top`, which is only 8px by default). A fanned-out plain dot needs the same
2344
- * treatment, its hovered radius plus the reach. Must run after `resolvePointLayout()` and
2345
- * between `initializeAxisState()` and `initializeChartState()`, see `reserveEdgeSpace`.
2409
+ * When any point has an `image`, makes room for it at the edge of the domain: the clip-path
2410
+ * buffer grows to half the box so the `.dots` group lets it through, and the margins grow to at
2411
+ * least that same amount so the `<svg>` doesn't cut off what the clip-path let through (an image
2412
+ * box is centered on its point, so at the top of the y domain half of it sits above the plot
2413
+ * area - in `margin.top`, which is only 8px by default). Half the box is all a fan-out needs
2414
+ * too: a fanned-out ring is shifted back inside the plot area (`fanOutShift`), so no member's
2415
+ * center ever sits past the edge either. Must run after `resolvePointLayout()` and between
2416
+ * `initializeAxisState()` and `initializeChartState()`, see `reserveEdgeSpace`.
2346
2417
  */
2347
2418
  reservePointSpace() {
2348
2419
  const hasImages = this.config.data.some((series) => series.data.some((point) => !!point.image));
2349
- if (!hasImages && this.fanOutReach === 0) {
2420
+ if (!hasImages) {
2350
2421
  this.clipBuffer = 10;
2351
2422
  return;
2352
2423
  }
2353
- const halfWidth = (hasImages ? Math.ceil(this.pointImage.maxWidth / 2) : 6) + this.fanOutReach;
2354
- const halfHeight = (hasImages ? Math.ceil(this.pointImage.maxHeight / 2) : 6) + this.fanOutReach;
2424
+ const halfWidth = Math.ceil(this.pointImage.maxWidth / 2);
2425
+ const halfHeight = Math.ceil(this.pointImage.maxHeight / 2);
2355
2426
  this.clipBuffer = Math.max(10, halfWidth, halfHeight);
2356
2427
  this.reserveEdgeSpace({ top: halfHeight, bottom: halfHeight, left: halfWidth, right: halfWidth });
2357
2428
  }
2358
2429
  createReusableClipPath() {
2359
- this.clipPathId = `pcac-clip-${Date.now()}-${Math.floor(Math.random() * 10000)}`;
2360
- this.svg.selectAll(`defs #${this.clipPathId}`).remove();
2361
- this.svg.append('defs')
2362
- .append('clipPath')
2430
+ const stamp = `${Date.now()}-${Math.floor(Math.random() * 10000)}`;
2431
+ this.clipPathId = `pcac-clip-${stamp}`;
2432
+ this.plotClipPathId = `pcac-clip-plot-${stamp}`;
2433
+ this.svg.selectAll(`defs #${this.clipPathId}, defs #${this.plotClipPathId}`).remove();
2434
+ const defs = this.svg.append('defs');
2435
+ defs.append('clipPath')
2363
2436
  .attr('id', this.clipPathId)
2364
2437
  .append('rect')
2365
2438
  // Extend the clip-path past the drawable area on every side so a dot (or point image) at
@@ -2368,6 +2441,17 @@ class PlaChartBuilder extends PcacChart {
2368
2441
  .attr('y', -this.clipBuffer)
2369
2442
  .attr('width', this.width + this.clipBuffer * 2)
2370
2443
  .attr('height', this.height + this.clipBuffer * 2);
2444
+ // Lines, areas and the fan-out anchors and spokes get the plot area itself, give or take a
2445
+ // stroke: a line along the domain's max keeps its full width rather than being halved at
2446
+ // the edge, but nothing runs on into the points' buffer - a spoke to a member that zoom has
2447
+ // carried out of the plot (and hidden, see `pointVisible`) stops at the axis.
2448
+ defs.append('clipPath')
2449
+ .attr('id', this.plotClipPathId)
2450
+ .append('rect')
2451
+ .attr('x', -PLOT_CLIP_ALLOWANCE)
2452
+ .attr('y', -PLOT_CLIP_ALLOWANCE)
2453
+ .attr('width', this.width + PLOT_CLIP_ALLOWANCE * 2)
2454
+ .attr('height', this.height + PLOT_CLIP_ALLOWANCE * 2);
2371
2455
  }
2372
2456
  get zoomEnabled() {
2373
2457
  return !!(this.config.enableZoomX || this.config.enableZoomY);
@@ -2406,7 +2490,7 @@ class PlaChartBuilder extends PcacChart {
2406
2490
  drawLine(lineData, index, hide = false) {
2407
2491
  this.svg.append('g')
2408
2492
  .attr('class', 'lines')
2409
- .attr('clip-path', `url(#${this.clipPathId})`) // <-- apply clip-path to line group
2493
+ .attr('clip-path', `url(#${this.plotClipPathId})`)
2410
2494
  .append('path')
2411
2495
  .datum(lineData)
2412
2496
  .attr('class', 'line')
@@ -2423,7 +2507,7 @@ class PlaChartBuilder extends PcacChart {
2423
2507
  drawArea(lineData, index, hide = false) {
2424
2508
  this.svg.append('g')
2425
2509
  .attr('class', 'areas')
2426
- .attr('clip-path', `url(#${this.clipPathId})`) // <-- apply clip
2510
+ .attr('clip-path', `url(#${this.plotClipPathId})`)
2427
2511
  .append('path')
2428
2512
  .datum(lineData)
2429
2513
  .attr('class', 'area')
@@ -2442,10 +2526,11 @@ class PlaChartBuilder extends PcacChart {
2442
2526
  /**
2443
2527
  * Draws one `<g class="fan-outs">` holding a `<g class="fan-out">` per group of coincident
2444
2528
  * points: a spoke from the shared coordinate to where each member is drawn, and an anchor dot
2445
- * on the coordinate itself. Only when the fan-out is on and asks for anchors. The group is
2446
- * positioned by the same translate as a point (see `drawDots`), so zoom moves it the same
2447
- * way and everything inside is relative to the coordinate; it fades in over the points' own
2448
- * entry transition.
2529
+ * on the coordinate itself. Only when the fan-out is on and asks for anchors. The group sits on
2530
+ * the true coordinate (unlike a point group, which also carries its ring's shift - see
2531
+ * `pointTransform`), so zoom moves it the same way and everything inside is relative to the
2532
+ * coordinate; each spoke ends where its member is actually drawn, ring offset plus shift. It
2533
+ * fades in over the points' own entry transition.
2449
2534
  */
2450
2535
  drawFanOuts() {
2451
2536
  if (!this.fanOut?.showAnchor || this.coincidentGroups.length === 0) {
@@ -2453,20 +2538,20 @@ class PlaChartBuilder extends PcacChart {
2453
2538
  }
2454
2539
  const groups = this.svg.append('g')
2455
2540
  .attr('class', 'fan-outs')
2456
- .attr('clip-path', `url(#${this.clipPathId})`)
2541
+ .attr('clip-path', `url(#${this.plotClipPathId})`)
2457
2542
  .selectAll('.fan-out')
2458
2543
  .data(this.coincidentGroups)
2459
2544
  .enter().append('g')
2460
2545
  .attr('class', 'fan-out')
2461
2546
  .attr('transform', (group) => this.fanOutTransform(group, this.scales));
2462
2547
  groups.selectAll('.fan-out-spoke')
2463
- .data((group) => group.members.map((member) => this.offsetOf(member.data)))
2548
+ .data((group) => group.members)
2464
2549
  .enter().append('line')
2465
2550
  .attr('class', 'fan-out-spoke')
2466
2551
  .attr('x1', 0)
2467
2552
  .attr('y1', 0)
2468
- .attr('x2', (spoke) => spoke.dx)
2469
- .attr('y2', (spoke) => spoke.dy);
2553
+ .attr('x2', (member) => this.spokeEnd(member, this.scales).dx)
2554
+ .attr('y2', (member) => this.spokeEnd(member, this.scales).dy);
2470
2555
  groups.append('circle')
2471
2556
  .attr('class', 'fan-out-anchor')
2472
2557
  .attr('r', 3);
@@ -2483,8 +2568,9 @@ class PlaChartBuilder extends PcacChart {
2483
2568
  * in its place, and sits at the group's origin. Both animate in from the baseline the same way
2484
2569
  * - the start is the baseline expressed relative to the point, since the group is already on
2485
2570
  * the point - and the tooltip / click handlers sit on the group so they behave identically for
2486
- * either. A fanned-out point's offset is applied to the child, inside the group, so it too is
2487
- * untouched by zoom.
2571
+ * either. A fanned-out point's ring offset is applied to the child, inside the group, so it too
2572
+ * is untouched by zoom; only its ring's shift back into the plot area, which depends on where
2573
+ * the coordinate is, rides along in the group's translate (see `pointTransform`).
2488
2574
  */
2489
2575
  drawDots(config) {
2490
2576
  const self = this;
@@ -2502,6 +2588,7 @@ class PlaChartBuilder extends PcacChart {
2502
2588
  .enter().append('g')
2503
2589
  .attr('class', 'point')
2504
2590
  .attr('transform', (d, i) => this.pointTransform(d, i, this.scales))
2591
+ .attr('display', (d, i) => this.pointDisplay(d, i, this.scales))
2505
2592
  .on('mouseover', function (event, d) {
2506
2593
  // `d` is the very element bound from `series.data` above, so identity lookup is exact.
2507
2594
  self.showTooltip(event, d, {
@@ -2560,17 +2647,76 @@ class PlaChartBuilder extends PcacChart {
2560
2647
  .attr('y', (d) => -maxHeight / 2 + this.offsetOf(d).dy);
2561
2648
  }
2562
2649
  }
2650
+ /**
2651
+ * Where a point's group goes: its true coordinate, plus - for a fanned-out point - however far
2652
+ * its ring had to be shifted to stay inside the plot area at these scales. The shift is on the
2653
+ * group rather than the child because it changes as zoom moves the coordinate (the ring offset,
2654
+ * on the child, doesn't), and this is the one attribute zoom already updates.
2655
+ */
2563
2656
  pointTransform(d, i, scales) {
2564
- return `translate(${getXFormat(this.xAxis.format, d, i, scales.x)}, ${scales.y(d.value)})`;
2565
- }
2566
- /** A fan-out sits where its members would have been drawn; any member locates it. */
2657
+ const { x, y } = this.pointPlacement(d, i, scales);
2658
+ return `translate(${x}, ${y})`;
2659
+ }
2660
+ /**
2661
+ * The `display` of a point's group at these scales: shown while its center is inside the plot
2662
+ * area, `none` once zoom has carried it past an edge. Together with the clip-path's buffer this
2663
+ * is what bounds how far a mark may hang over an axis: a point on the edge is drawn whole, half
2664
+ * of it outside the plot, and that half is the most that ever shows - the alternative, letting
2665
+ * the clip-path's buffer do the work, showed a point up to a whole half-mark beyond the axis
2666
+ * with its center already outside. Also takes it out of hover's reach, as a hidden group
2667
+ * receives no pointer events.
2668
+ */
2669
+ pointDisplay(d, i, scales) {
2670
+ return this.pointVisible(d, i, scales) ? null : 'none';
2671
+ }
2672
+ pointVisible(d, i, scales) {
2673
+ const { x, y } = this.markCenter(d, i, scales);
2674
+ // A hair of slack, so a point on the domain's edge isn't lost to a rescaled scale landing on
2675
+ // -0.0000001 instead of 0.
2676
+ const slack = 0.5;
2677
+ return x >= -slack && x <= this.width + slack && y >= -slack && y <= this.height + slack;
2678
+ }
2679
+ /** Where the point's group is drawn: its coordinate plus its ring's shift, if it's fanned out. */
2680
+ pointPlacement(d, i, scales) {
2681
+ const { x, y } = this.pointPosition(d, i, scales);
2682
+ const shift = this.shiftOf(d, scales);
2683
+ return { x: x + shift.dx, y: y + shift.dy };
2684
+ }
2685
+ /** Where the mark itself is centered: the group's placement plus the ring offset on the child. */
2686
+ markCenter(d, i, scales) {
2687
+ const { x, y } = this.pointPlacement(d, i, scales);
2688
+ const offset = this.offsetOf(d);
2689
+ return { x: x + offset.dx, y: y + offset.dy };
2690
+ }
2691
+ /** A fan-out sits on its members' true coordinate, unshifted; any member locates it. */
2567
2692
  fanOutTransform(group, scales) {
2568
2693
  const { data, index } = group.members[0];
2569
- return this.pointTransform(data, index, scales);
2694
+ const { x, y } = this.pointPosition(data, index, scales);
2695
+ return `translate(${x}, ${y})`;
2696
+ }
2697
+ pointPosition(d, i, scales) {
2698
+ return { x: getXFormat(this.xAxis.format, d, i, scales.x), y: scales.y(d.value) };
2570
2699
  }
2700
+ /** A member's ring offset from the shared coordinate, `0` for a point that isn't fanned out. */
2571
2701
  offsetOf(d) {
2572
2702
  return this.fanOutOffsets.get(d) ?? { dx: 0, dy: 0 };
2573
2703
  }
2704
+ /** How far `d`'s ring is moved back into the plot area at these scales (see `fanOutShift`). */
2705
+ shiftOf(d, scales) {
2706
+ const group = this.coincidentOf.get(d);
2707
+ if (!group || !this.fanOutOffsets.has(d)) {
2708
+ return { dx: 0, dy: 0 };
2709
+ }
2710
+ const { data, index } = group.members[0];
2711
+ const offsets = group.members.map((member) => this.offsetOf(member.data));
2712
+ return fanOutShift(this.pointPosition(data, index, scales), offsets, { width: this.width, height: this.height });
2713
+ }
2714
+ /** Where a spoke ends, relative to its anchor: where the member is drawn, ring offset plus shift. */
2715
+ spokeEnd(member, scales) {
2716
+ const offset = this.offsetOf(member.data);
2717
+ const shift = this.shiftOf(member.data, scales);
2718
+ return { dx: offset.dx + shift.dx, dy: offset.dy + shift.dy };
2719
+ }
2574
2720
  /** The other points at `d`'s coordinate, for the tooltip context (see `PcacTooltipContext.coincident`). */
2575
2721
  coincidentWith(d) {
2576
2722
  const group = this.coincidentOf.get(d);
@@ -2581,10 +2727,10 @@ class PlaChartBuilder extends PcacChart {
2581
2727
  .filter((member) => member.data !== d)
2582
2728
  .map((member) => ({ data: member.data, parent: member.series, index: member.index, parentIndex: member.seriesIndex }));
2583
2729
  }
2584
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PlaChartBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2585
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PlaChartBuilder });
2730
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PlaChartBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2731
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PlaChartBuilder });
2586
2732
  }
2587
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PlaChartBuilder, decorators: [{
2733
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PlaChartBuilder, decorators: [{
2588
2734
  type: Injectable
2589
2735
  }] });
2590
2736
 
@@ -2632,10 +2778,10 @@ class PcacLineAreaChartComponent {
2632
2778
  this.chartBuilder.buildChart(this.chartElm(), config, this.type());
2633
2779
  }
2634
2780
  }
2635
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacLineAreaChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2636
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: PcacLineAreaChartComponent, isStandalone: true, selector: "pcac-line-area-chart", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, tooltipTemplate: { classPropertyName: "tooltipTemplate", publicName: "tooltipTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dotClicked: "dotClicked" }, host: { properties: { "class.pcac-height-full": "config().heightFull" } }, providers: [PlaChartBuilder, PlaChartEffectsBuilder], viewQueries: [{ propertyName: "chartElm", first: true, predicate: ["chart"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"pcac-line-area-chart\">\n <svg #chart></svg>\n</section>\n\n", styles: [".pcac-line-area-chart svg{width:100%;display:block}.pcac-line-area-chart .dot{stroke-width:2px}.pcac-line-area-chart .fan-out-spoke{stroke:#ced4da;stroke-width:1px}.pcac-line-area-chart .fan-out-anchor{fill:#6c757d}.pcac-line-area-chart .effects-canvas{fill:none}.pcac-line-area-chart .effect-line{stroke:#ced4da;stroke-width:1px;opacity:0}.pcac-line-area-chart .effect-circle{stroke-width:1px;fill:none;opacity:0}.pcac-line-area-chart .effect-text{font-size:11px;font-weight:700;fill:#343a40}pcac-line-chart.pcac-height-full,pcac-area-chart.pcac-height-full,pcac-plot-chart.pcac-height-full,pcac-line-area-chart.pcac-height-full{display:block;height:100%}pcac-line-area-chart.pcac-height-full .pcac-line-area-chart{height:100%}\n"], encapsulation: i0.ViewEncapsulation.None });
2781
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacLineAreaChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2782
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: PcacLineAreaChartComponent, isStandalone: true, selector: "pcac-line-area-chart", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, tooltipTemplate: { classPropertyName: "tooltipTemplate", publicName: "tooltipTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dotClicked: "dotClicked" }, host: { properties: { "class.pcac-height-full": "config().heightFull" } }, providers: [PlaChartBuilder, PlaChartEffectsBuilder], viewQueries: [{ propertyName: "chartElm", first: true, predicate: ["chart"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"pcac-line-area-chart\">\n <svg #chart></svg>\n</section>\n\n", styles: [".pcac-line-area-chart svg{width:100%;display:block}.pcac-line-area-chart .dot{stroke-width:2px}.pcac-line-area-chart .fan-out-spoke{stroke:#ced4da;stroke-width:1px}.pcac-line-area-chart .fan-out-anchor{fill:#6c757d}.pcac-line-area-chart .effects-canvas{fill:none}.pcac-line-area-chart .effect-line{stroke:#ced4da;stroke-width:1px;opacity:0}.pcac-line-area-chart .effect-circle{stroke-width:1px;fill:none;opacity:0}.pcac-line-area-chart .effect-text{font-size:11px;font-weight:700;fill:#343a40}pcac-line-chart.pcac-height-full,pcac-area-chart.pcac-height-full,pcac-plot-chart.pcac-height-full,pcac-line-area-chart.pcac-height-full{display:block;height:100%}pcac-line-area-chart.pcac-height-full .pcac-line-area-chart{height:100%}\n"], encapsulation: i0.ViewEncapsulation.None });
2637
2783
  }
2638
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacLineAreaChartComponent, decorators: [{
2784
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacLineAreaChartComponent, decorators: [{
2639
2785
  type: Component,
2640
2786
  args: [{ selector: 'pcac-line-area-chart', host: { '[class.pcac-height-full]': 'config().heightFull' }, encapsulation: ViewEncapsulation.None, providers: [PlaChartBuilder, PlaChartEffectsBuilder], template: "<section class=\"pcac-line-area-chart\">\n <svg #chart></svg>\n</section>\n\n", styles: [".pcac-line-area-chart svg{width:100%;display:block}.pcac-line-area-chart .dot{stroke-width:2px}.pcac-line-area-chart .fan-out-spoke{stroke:#ced4da;stroke-width:1px}.pcac-line-area-chart .fan-out-anchor{fill:#6c757d}.pcac-line-area-chart .effects-canvas{fill:none}.pcac-line-area-chart .effect-line{stroke:#ced4da;stroke-width:1px;opacity:0}.pcac-line-area-chart .effect-circle{stroke-width:1px;fill:none;opacity:0}.pcac-line-area-chart .effect-text{font-size:11px;font-weight:700;fill:#343a40}pcac-line-chart.pcac-height-full,pcac-area-chart.pcac-height-full,pcac-plot-chart.pcac-height-full,pcac-line-area-chart.pcac-height-full{display:block;height:100%}pcac-line-area-chart.pcac-height-full .pcac-line-area-chart{height:100%}\n"] }]
2641
2787
  }], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], chartElm: [{ type: i0.ViewChild, args: ['chart', { isSignal: true }] }], dotClicked: [{ type: i0.Output, args: ["dotClicked"] }], tooltipTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipTemplate", required: false }] }] } });
@@ -2651,10 +2797,10 @@ class PcacPlotChart {
2651
2797
  */
2652
2798
  tooltipTemplate = contentChild(PcacTooltipDirective, /* @ts-ignore */
2653
2799
  ...(ngDevMode ? [{ debugName: "tooltipTemplate" }] : /* istanbul ignore next */ []));
2654
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacPlotChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
2655
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: PcacPlotChart, isStandalone: true, selector: "pcac-plot-chart", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { dotClicked: "dotClicked" }, host: { properties: { "class.pcac-height-full": "config().heightFull" } }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: PcacTooltipDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<pcac-line-area-chart [config]=\"config()\" [tooltipTemplate]=\"tooltipTemplate()?.templateRef\" [type]=\"types.Plot\" (dotClicked)=\"dotClicked.emit($event)\"/>", dependencies: [{ kind: "component", type: PcacLineAreaChartComponent, selector: "pcac-line-area-chart", inputs: ["config", "type", "tooltipTemplate"], outputs: ["dotClicked"] }] });
2800
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacPlotChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
2801
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: PcacPlotChart, isStandalone: true, selector: "pcac-plot-chart", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { dotClicked: "dotClicked" }, host: { properties: { "class.pcac-height-full": "config().heightFull" } }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: PcacTooltipDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<pcac-line-area-chart [config]=\"config()\" [tooltipTemplate]=\"tooltipTemplate()?.templateRef\" [type]=\"types.Plot\" (dotClicked)=\"dotClicked.emit($event)\"/>", dependencies: [{ kind: "component", type: PcacLineAreaChartComponent, selector: "pcac-line-area-chart", inputs: ["config", "type", "tooltipTemplate"], outputs: ["dotClicked"] }] });
2656
2802
  }
2657
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacPlotChart, decorators: [{
2803
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacPlotChart, decorators: [{
2658
2804
  type: Component,
2659
2805
  args: [{ selector: 'pcac-plot-chart', host: { '[class.pcac-height-full]': 'config().heightFull' }, imports: [PcacLineAreaChartComponent], template: "<pcac-line-area-chart [config]=\"config()\" [tooltipTemplate]=\"tooltipTemplate()?.templateRef\" [type]=\"types.Plot\" (dotClicked)=\"dotClicked.emit($event)\"/>" }]
2660
2806
  }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], dotClicked: [{ type: i0.Output, args: ["dotClicked"] }], tooltipTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PcacTooltipDirective), { isSignal: true }] }] } });
@@ -2670,10 +2816,10 @@ class PcacLineChart {
2670
2816
  */
2671
2817
  tooltipTemplate = contentChild(PcacTooltipDirective, /* @ts-ignore */
2672
2818
  ...(ngDevMode ? [{ debugName: "tooltipTemplate" }] : /* istanbul ignore next */ []));
2673
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacLineChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
2674
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: PcacLineChart, isStandalone: true, selector: "pcac-line-chart", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { dotClicked: "dotClicked" }, host: { properties: { "class.pcac-height-full": "config().heightFull" } }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: PcacTooltipDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<pcac-line-area-chart [config]=\"config()\" [tooltipTemplate]=\"tooltipTemplate()?.templateRef\" [type]=\"types.Line\" (dotClicked)=\"dotClicked.emit($event)\" />", dependencies: [{ kind: "component", type: PcacLineAreaChartComponent, selector: "pcac-line-area-chart", inputs: ["config", "type", "tooltipTemplate"], outputs: ["dotClicked"] }] });
2819
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacLineChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
2820
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: PcacLineChart, isStandalone: true, selector: "pcac-line-chart", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { dotClicked: "dotClicked" }, host: { properties: { "class.pcac-height-full": "config().heightFull" } }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: PcacTooltipDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<pcac-line-area-chart [config]=\"config()\" [tooltipTemplate]=\"tooltipTemplate()?.templateRef\" [type]=\"types.Line\" (dotClicked)=\"dotClicked.emit($event)\" />", dependencies: [{ kind: "component", type: PcacLineAreaChartComponent, selector: "pcac-line-area-chart", inputs: ["config", "type", "tooltipTemplate"], outputs: ["dotClicked"] }] });
2675
2821
  }
2676
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacLineChart, decorators: [{
2822
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacLineChart, decorators: [{
2677
2823
  type: Component,
2678
2824
  args: [{ selector: 'pcac-line-chart', host: { '[class.pcac-height-full]': 'config().heightFull' }, imports: [PcacLineAreaChartComponent], template: "<pcac-line-area-chart [config]=\"config()\" [tooltipTemplate]=\"tooltipTemplate()?.templateRef\" [type]=\"types.Line\" (dotClicked)=\"dotClicked.emit($event)\" />" }]
2679
2825
  }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], dotClicked: [{ type: i0.Output, args: ["dotClicked"] }], tooltipTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PcacTooltipDirective), { isSignal: true }] }] } });
@@ -2692,10 +2838,10 @@ class PcacAreaChart {
2692
2838
  */
2693
2839
  tooltipTemplate = contentChild(PcacTooltipDirective, /* @ts-ignore */
2694
2840
  ...(ngDevMode ? [{ debugName: "tooltipTemplate" }] : /* istanbul ignore next */ []));
2695
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacAreaChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
2696
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: PcacAreaChart, isStandalone: true, selector: "pcac-area-chart", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { dotClicked: "dotClicked" }, host: { properties: { "class.pcac-height-full": "config().heightFull" } }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: PcacTooltipDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<pcac-line-area-chart [config]=\"config()\" [tooltipTemplate]=\"tooltipTemplate()?.templateRef\" [type]=\"types.Area\" (dotClicked)=\"dotClicked.emit($event)\" />", dependencies: [{ kind: "component", type: PcacLineAreaChartComponent, selector: "pcac-line-area-chart", inputs: ["config", "type", "tooltipTemplate"], outputs: ["dotClicked"] }] });
2841
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacAreaChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
2842
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: PcacAreaChart, isStandalone: true, selector: "pcac-area-chart", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { dotClicked: "dotClicked" }, host: { properties: { "class.pcac-height-full": "config().heightFull" } }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: PcacTooltipDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<pcac-line-area-chart [config]=\"config()\" [tooltipTemplate]=\"tooltipTemplate()?.templateRef\" [type]=\"types.Area\" (dotClicked)=\"dotClicked.emit($event)\" />", dependencies: [{ kind: "component", type: PcacLineAreaChartComponent, selector: "pcac-line-area-chart", inputs: ["config", "type", "tooltipTemplate"], outputs: ["dotClicked"] }] });
2697
2843
  }
2698
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacAreaChart, decorators: [{
2844
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacAreaChart, decorators: [{
2699
2845
  type: Component,
2700
2846
  args: [{ selector: 'pcac-area-chart', host: { '[class.pcac-height-full]': 'config().heightFull' }, imports: [PcacLineAreaChartComponent], template: "<pcac-line-area-chart [config]=\"config()\" [tooltipTemplate]=\"tooltipTemplate()?.templateRef\" [type]=\"types.Area\" (dotClicked)=\"dotClicked.emit($event)\" />" }]
2701
2847
  }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], dotClicked: [{ type: i0.Output, args: ["dotClicked"] }], tooltipTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PcacTooltipDirective), { isSignal: true }] }] } });
@@ -2797,10 +2943,10 @@ class PieChartBuilder extends PcacChart {
2797
2943
  const i = interpolate({ startAngle: 0, endAngle: 0 }, b);
2798
2944
  return (t) => this.arcShape(i(t)) ?? '';
2799
2945
  }
2800
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PieChartBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2801
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PieChartBuilder });
2946
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PieChartBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2947
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PieChartBuilder });
2802
2948
  }
2803
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PieChartBuilder, decorators: [{
2949
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PieChartBuilder, decorators: [{
2804
2950
  type: Injectable
2805
2951
  }] });
2806
2952
 
@@ -2840,10 +2986,10 @@ class PcacPieChartComponent {
2840
2986
  this.chartBuilder.buildChart(this.chartElm(), config);
2841
2987
  }
2842
2988
  }
2843
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacPieChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2844
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: PcacPieChartComponent, isStandalone: true, selector: "pcac-pie-chart", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { sliceClicked: "sliceClicked" }, providers: [PieChartBuilder], queries: [{ propertyName: "tooltipTemplate", first: true, predicate: PcacTooltipDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "chartElm", first: true, predicate: ["chart"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"pcac-pie-chart\">\n <svg #chart></svg>\n</section>\n\n", styles: [".pcac-pie-chart svg{width:100%;display:block}.pcac-pie-chart .dot{fill:none;stroke-width:1px}\n"], encapsulation: i0.ViewEncapsulation.None });
2989
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacPieChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2990
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: PcacPieChartComponent, isStandalone: true, selector: "pcac-pie-chart", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { sliceClicked: "sliceClicked" }, providers: [PieChartBuilder], queries: [{ propertyName: "tooltipTemplate", first: true, predicate: PcacTooltipDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "chartElm", first: true, predicate: ["chart"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"pcac-pie-chart\">\n <svg #chart></svg>\n</section>\n\n", styles: [".pcac-pie-chart svg{width:100%;display:block}.pcac-pie-chart .dot{fill:none;stroke-width:1px}\n"], encapsulation: i0.ViewEncapsulation.None });
2845
2991
  }
2846
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PcacPieChartComponent, decorators: [{
2992
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PcacPieChartComponent, decorators: [{
2847
2993
  type: Component,
2848
2994
  args: [{ selector: 'pcac-pie-chart', encapsulation: ViewEncapsulation.None, providers: [PieChartBuilder], template: "<section class=\"pcac-pie-chart\">\n <svg #chart></svg>\n</section>\n\n", styles: [".pcac-pie-chart svg{width:100%;display:block}.pcac-pie-chart .dot{fill:none;stroke-width:1px}\n"] }]
2849
2995
  }], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], chartElm: [{ type: i0.ViewChild, args: ['chart', { isSignal: true }] }], sliceClicked: [{ type: i0.Output, args: ["sliceClicked"] }], tooltipTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PcacTooltipDirective), { isSignal: true }] }] } });