@pioneer-code/pioneer-charts 22.2.19 → 22.2.21

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.
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![npm](https://img.shields.io/npm/v/@pioneer-code/pioneer-charts)](https://www.npmjs.com/package/@pioneer-code/pioneer-charts)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
6
 
7
- Pioneer Charts is an Angular library for building beautiful, customizable, and responsive data visualizations. It leverages [D3.js](https://d3js.org/) for rendering and provides bar, line/area, plot, pie and donut charts, plus a legend component.
7
+ Pioneer Charts is an Angular library for building beautiful, customizable, and responsive data visualizations. It leverages [D3.js](https://d3js.org/) for rendering and provides bar, line/area, plot, pie, donut, dot plot and proximity charts, plus a legend component.
8
8
 
9
9
  ## Documentation
10
10
 
@@ -14,7 +14,7 @@ Guides, the API reference, live examples, and theming instructions all live on t
14
14
 
15
15
  ## Features
16
16
 
17
- - Bar (vertical and horizontal), line, area, plot, pie and donut charts, plus a legend.
17
+ - Bar (vertical and horizontal), line, area, plot, pie, donut, dot plot and proximity charts, plus a legend.
18
18
  - Beautiful default theme, customizable via CSS or by overriding the source Sass variables.
19
19
  - Strongly typed configuration contracts.
20
20
  - Outputs for user interaction (bar, slice, dot, and legend clicks).
@@ -256,6 +256,16 @@ class PcacData {
256
256
  * Optional for the same reason as `image`.
257
257
  */
258
258
  gauge;
259
+ /**
260
+ * The consumer's own identifier for this item - a record's primary key, say. Nothing draws or
261
+ * labels it; it's carried through untouched so a click output (`dotClicked`, `barClicked`,
262
+ * `sliceClicked`, `itemClicked`) can be traced back to the record it came from. Click outputs
263
+ * emit a copy of the item (the chart works on a copy of its config), so matching by object
264
+ * identity doesn't work, and matching by `key` or `image` breaks as soon as two items share one.
265
+ *
266
+ * Optional for the same reason as `image`.
267
+ */
268
+ id;
259
269
  }
260
270
  /**
261
271
  * One side of a `PcacDataRange`. `min` above `max` is read as the other way round; `min` equal to
@@ -889,16 +899,33 @@ class PcacTooltipBuilder {
889
899
  * Created on first use rather than with the service, which every chart builder injects: that
890
900
  * way nothing touches the DOM until a chart actually shows a tooltip, so building a chart
891
901
  * where there's no browser `document` (server-side rendering) doesn't throw. Removed again in
892
- * `ngOnDestroy()`, when the app that owns this root service is destroyed.
902
+ * `ngOnDestroy()`, when the app that owns this root service is destroyed. The touch listener
903
+ * (see `onPointerDown`) is added and removed with it.
893
904
  */
894
905
  get tooltip() {
895
- this.shell ??= select(this.document.body)
896
- .append('div')
897
- .attr('class', 'pcac-d3-tooltip')
898
- .attr('id', PcacTooltipBuilder.ID)
899
- .attr('role', 'tooltip');
906
+ if (!this.shell) {
907
+ this.shell = select(this.document.body)
908
+ .append('div')
909
+ .attr('class', 'pcac-d3-tooltip')
910
+ .attr('id', PcacTooltipBuilder.ID)
911
+ .attr('role', 'tooltip');
912
+ this.document.addEventListener('pointerdown', this.onPointerDown, { capture: true, passive: true });
913
+ }
900
914
  return this.shell;
901
915
  }
916
+ /**
917
+ * A touch (or pen) coming down anywhere closes the tooltip. A tap shows it by way of the mouse
918
+ * events the browser makes up for the tap, but nothing then moves off the mark to hide it again:
919
+ * without this it stayed up after a tap until the next one happened to land on another mark,
920
+ * scrolled away with the page, and covered whatever opened in response. A tap on another mark
921
+ * still shows its tooltip - this runs first, on the way down, and the made-up mouse events that
922
+ * show the new one come after. A mouse is left alone; it hides the tooltip by leaving the mark.
923
+ */
924
+ onPointerDown = (event) => {
925
+ if (event.pointerType !== 'mouse') {
926
+ this.hideTooltip();
927
+ }
928
+ };
902
929
  /**
903
930
  * The consumer template currently rendered into the shell, if any. Created on the first show
904
931
  * of a hover and torn down in `hideTooltip()` - not kept around between hovers - so a view is
@@ -962,6 +989,9 @@ class PcacTooltipBuilder {
962
989
  }
963
990
  ngOnDestroy() {
964
991
  this.destroyView();
992
+ if (this.shell) {
993
+ this.document.removeEventListener('pointerdown', this.onPointerDown, { capture: true });
994
+ }
965
995
  this.shell?.remove();
966
996
  this.shell = null;
967
997
  }
@@ -2779,10 +2809,16 @@ class PcacReferenceLine {
2779
2809
  */
2780
2810
  value = 0;
2781
2811
  /**
2782
- * A few words drawn at the line's far end, inside the plot: above the right end of a horizontal
2783
- * line, beside the top of a vertical one. Styled by the theme's `.reference-line-label` rule.
2812
+ * A few words drawn at one end of the line, inside the plot (see `labelPosition`). Styled by the
2813
+ * theme's `.reference-line-label` rule.
2784
2814
  */
2785
2815
  label;
2816
+ /**
2817
+ * Which end of the line `label` sits at. `'end'`, the default, is above the right end of a
2818
+ * horizontal line and beside the top of a vertical one; `'start'` is above its left end and beside
2819
+ * its bottom - for when the far end is crowded, say by a corner label.
2820
+ */
2821
+ labelPosition = 'end';
2786
2822
  /**
2787
2823
  * Any CSS color for the line and its label. Theme default `$gray-500`. Applied as
2788
2824
  * `--pcac-reference-line-color` on the line's group, so a stylesheet can set it on an ancestor
@@ -2794,8 +2830,8 @@ class PcacReferenceLine {
2794
2830
  * Text pinned to the plot area's corners (see `PcacLineAreaChartConfig.cornerLabels`) - names for
2795
2831
  * the regions the plot divides into, such as the quadrants between two reference lines. Pinned to
2796
2832
  * the plot's frame rather than to data, so they stay put when the chart is zoomed. Drawn under the
2797
- * series, so a point in the corner covers its label rather than the other way round. Any corner
2798
- * left unset is left empty.
2833
+ * series, so a point in the corner covers its label rather than the other way round, unless the
2834
+ * chart sets `labelsOnTop`. Any corner left unset is left empty.
2799
2835
  */
2800
2836
  class PcacCornerLabels {
2801
2837
  topLeft;
@@ -2862,6 +2898,15 @@ class PcacLineAreaChartConfig extends PcacAxisChartConfig {
2862
2898
  * screen readers like the grid, so when they carry meaning, say so in the chart's `ariaLabel`.
2863
2899
  */
2864
2900
  cornerLabels;
2901
+ /**
2902
+ * Draw the corner labels and reference-line labels over the series instead of under it, each
2903
+ * outlined in a halo so it stays readable on whatever it crosses - for a chart whose points crowd
2904
+ * the corners or the lines' ends, where they'd otherwise hide the labels. Default false. The halo
2905
+ * is `--pcac-label-halo-color`, the theme's `$white` by default: set it to the chart's background
2906
+ * (a dark one, say) on the chart or any ancestor. The labels never take the pointer, so a point
2907
+ * under one can still be hovered and clicked. The reference lines themselves stay under the series.
2908
+ */
2909
+ labelsOnTop;
2865
2910
  }
2866
2911
 
2867
2912
  /**
@@ -3767,9 +3812,10 @@ function referenceLinePosition(line, scales, xFormat) {
3767
3812
  }
3768
3813
  /**
3769
3814
  * Draws `lines` into one `.reference-lines` group, clipped to the plot (`clipPathId`) so a line
3770
- * zoomed past an edge disappears there. Each line is a `.reference-line` group holding the dashed
3771
- * `<line>` and, when it has one, its `.reference-line-label`. Hidden from screen readers, as the
3772
- * grid is.
3815
+ * zoomed past an edge disappears there, each a `.reference-line` group holding the dashed `<line>`.
3816
+ * Their labels go in a `.reference-line-labels` group of their own, clipped the same way, so they
3817
+ * can be raised over the series (`raiseLabels`) without the lines. Both hidden from screen readers,
3818
+ * as the grid is.
3773
3819
  */
3774
3820
  function drawReferenceLines(svg, lines, scales, xFormat, width, height, clipPathId) {
3775
3821
  if (!lines?.length) {
@@ -3786,31 +3832,46 @@ function drawReferenceLines(svg, lines, scales, xFormat, width, height, clipPath
3786
3832
  .attr('class', (line) => `reference-line reference-line-${line.axis}`)
3787
3833
  .style('--pcac-reference-line-color', (line) => line.color ?? null);
3788
3834
  groups.append('line').attr('class', 'reference-line-stroke');
3789
- groups.filter((line) => !!line.label)
3790
- .append('text')
3791
- .attr('class', 'reference-line-label')
3792
- .text((line) => line.label);
3835
+ const labelled = resolved.filter((line) => !!line.label);
3836
+ if (labelled.length) {
3837
+ svg.append('g')
3838
+ .attr('class', 'reference-line-labels')
3839
+ .attr('clip-path', `url(#${clipPathId})`)
3840
+ .attr('aria-hidden', 'true')
3841
+ .selectAll('.reference-line-label')
3842
+ .data(labelled)
3843
+ .enter().append('text')
3844
+ .attr('class', (line) => `reference-line-label reference-line-label-${line.axis}`)
3845
+ .style('--pcac-reference-line-color', (line) => line.color ?? null)
3846
+ .text((line) => line.label);
3847
+ }
3793
3848
  positionReferenceLines(svg, scales, xFormat, width, height);
3794
3849
  }
3795
3850
  /**
3796
3851
  * Places the chart's reference lines, and their labels, against `scales` - on the first draw and
3797
- * again on every zoom. A horizontal line's label sits above its right end; a vertical line's beside
3798
- * its top.
3852
+ * again on every zoom. A horizontal line's label sits above its right end, or its left with
3853
+ * `labelPosition: 'start'`; a vertical line's beside its top, or its bottom.
3799
3854
  */
3800
3855
  function positionReferenceLines(svg, scales, xFormat, width, height) {
3801
- const groups = svg.selectAll('.reference-line')
3802
- .attr('display', (line) => referenceLinePosition(line, scales, xFormat) === null ? 'none' : null);
3856
+ const hidden = (line) => referenceLinePosition(line, scales, xFormat) === null ? 'none' : null;
3857
+ const groups = svg.selectAll('.reference-line').attr('display', hidden);
3803
3858
  const at = (line) => referenceLinePosition(line, scales, xFormat) ?? 0;
3859
+ const atStart = (line) => line.labelPosition === 'start';
3804
3860
  groups.select('.reference-line-stroke')
3805
3861
  .attr('x1', (line) => line.axis === 'x' ? at(line) : 0)
3806
3862
  .attr('x2', (line) => line.axis === 'x' ? at(line) : width)
3807
3863
  .attr('y1', (line) => line.axis === 'x' ? 0 : at(line))
3808
3864
  .attr('y2', (line) => line.axis === 'x' ? height : at(line));
3809
- groups.select('.reference-line-label')
3810
- .attr('x', (line) => line.axis === 'x' ? at(line) + LABEL_INSET : width - LABEL_INSET)
3811
- .attr('y', (line) => line.axis === 'x' ? LABEL_INSET : at(line) - LABEL_INSET)
3812
- .attr('text-anchor', (line) => line.axis === 'x' ? 'start' : 'end')
3813
- .attr('dominant-baseline', (line) => line.axis === 'x' ? 'hanging' : 'auto');
3865
+ svg.selectAll('.reference-line-label')
3866
+ .attr('display', hidden)
3867
+ .attr('x', (line) => line.axis === 'x'
3868
+ ? at(line) + LABEL_INSET
3869
+ : atStart(line) ? LABEL_INSET : width - LABEL_INSET)
3870
+ .attr('y', (line) => line.axis === 'x'
3871
+ ? atStart(line) ? height - LABEL_INSET : LABEL_INSET
3872
+ : at(line) - LABEL_INSET)
3873
+ .attr('text-anchor', (line) => line.axis === 'y' && !atStart(line) ? 'end' : 'start')
3874
+ .attr('dominant-baseline', (line) => line.axis === 'x' && !atStart(line) ? 'hanging' : 'auto');
3814
3875
  }
3815
3876
  /**
3816
3877
  * Draws `labels` into a `.corner-labels` group, each a `.corner-label` inset from its corner of
@@ -3844,6 +3905,16 @@ function drawCornerLabels(svg, labels, width, height) {
3844
3905
  .attr('dominant-baseline', (corner) => corner.baseline)
3845
3906
  .text((corner) => corner.text);
3846
3907
  }
3908
+ /**
3909
+ * With `labelsOnTop`, moves the corner labels and reference-line labels above everything drawn
3910
+ * so far - the series included - and marks them for the theme's halo. Called after each draw and
3911
+ * each zoom, which re-raises the series over the axes it redraws.
3912
+ */
3913
+ function raiseLabels(svg) {
3914
+ svg.selectAll('.corner-labels, .reference-line-labels')
3915
+ .classed('pcac-labels-on-top', true)
3916
+ .raise();
3917
+ }
3847
3918
 
3848
3919
  /**
3849
3920
  * Finds every set of points that share a coordinate across all of the chart's visible series.
@@ -4168,6 +4239,9 @@ class PlaChartBuilder extends PcacChart {
4168
4239
  this.svg.selectAll('.point-ranges').raise();
4169
4240
  this.svg.selectAll('.fan-outs').raise();
4170
4241
  this.svg.selectAll('.dots').raise();
4242
+ if (this.config.labelsOnTop) {
4243
+ raiseLabels(this.svg);
4244
+ }
4171
4245
  });
4172
4246
  this.zoomBehavior = behavior;
4173
4247
  }
@@ -4209,6 +4283,10 @@ class PlaChartBuilder extends PcacChart {
4209
4283
  this.drawPointRanges();
4210
4284
  this.drawFanOuts();
4211
4285
  this.drawDots(config);
4286
+ // Labels asked to stay readable go over all of it (see `labelsOnTop`).
4287
+ if (config.labelsOnTop) {
4288
+ raiseLabels(this.svg);
4289
+ }
4212
4290
  this.restoreTabStop(chartElm);
4213
4291
  }
4214
4292
  /**
@@ -4832,11 +4910,11 @@ class PcacLineAreaChartComponent {
4832
4910
  }
4833
4911
  }
4834
4912
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: PcacLineAreaChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4835
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.2.0", 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:var(--pcac-fan-out-spoke-color, #ced4da);stroke-width:1px}.pcac-line-area-chart .fan-out-anchor{fill:var(--pcac-fan-out-anchor-color, #6c757d)}.pcac-line-area-chart .reference-line-stroke{stroke:var(--pcac-reference-line-color, #adb5bd);stroke-width:1px;stroke-dasharray:4 4}.pcac-line-area-chart .reference-line-label{font-size:11px;fill:var(--pcac-reference-line-color, #adb5bd)}.pcac-line-area-chart .point-gauge-track{fill:none;stroke:var(--pcac-point-gauge-track-color, #e9ecef)}.pcac-line-area-chart .point-gauge-arc{fill:var(--pcac-point-gauge-color, var(--pcac-point-gauge-series-color))}.pcac-line-area-chart .corner-label{font-size:12px;font-weight:500;fill:var(--pcac-corner-label-color, #6c757d)}.pcac-line-area-chart .point-ranges .point-range-series{--pcac-point-range-resolved-color: var(--pcac-point-range-color, var(--pcac-point-range-series-color))}.pcac-line-area-chart .point-ranges .point-range{opacity:var(--pcac-point-range-resting-opacity, 1);transition:opacity .15s ease-out}.pcac-line-area-chart .point-ranges .point-range.is-focused{opacity:1}.pcac-line-area-chart .point-ranges.pcac-range-hover{--pcac-point-range-resting-opacity: 0}.pcac-line-area-chart .point-ranges.pcac-range-faint{--pcac-point-range-resting-opacity: var(--pcac-point-range-faint-opacity, .2)}.pcac-line-area-chart .point-ranges.pcac-range-always.has-focus .point-range:not(.is-focused){opacity:.5}.pcac-line-area-chart .point-ranges .point-range-whisker,.pcac-line-area-chart .point-ranges .point-range-cap{stroke:var(--pcac-point-range-resolved-color);stroke-width:1.25px}.pcac-line-area-chart .point-ranges .point-range-box{fill:var(--pcac-point-range-resolved-color);fill-opacity:.1;stroke:var(--pcac-point-range-resolved-color);stroke-opacity:.7;stroke-width:1.25px}.pcac-line-area-chart .point-ranges .point-range-stop{stop-color:var(--pcac-point-range-resolved-color)}.pcac-line-area-chart .point-ranges .is-focused .point-range-whisker,.pcac-line-area-chart .point-ranges .is-focused .point-range-cap,.pcac-line-area-chart .point-ranges .is-focused .point-range-box{stroke-width:1.75px}.pcac-line-area-chart .point-ranges .is-focused .point-range-box{fill-opacity:.18}@media(prefers-reduced-motion:reduce){.pcac-line-area-chart .point-ranges .point-range{transition:none}}.pcac-line-area-chart .effects-canvas{fill:none}.pcac-line-area-chart .effect-line{stroke:var(--pcac-crosshair-line-color, #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:var(--pcac-crosshair-text-color, #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 });
4913
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.2.0", 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:var(--pcac-fan-out-spoke-color, #ced4da);stroke-width:1px}.pcac-line-area-chart .fan-out-anchor{fill:var(--pcac-fan-out-anchor-color, #6c757d)}.pcac-line-area-chart .reference-line-stroke{stroke:var(--pcac-reference-line-color, #adb5bd);stroke-width:1px;stroke-dasharray:4 4}.pcac-line-area-chart .reference-line-label{font-size:11px;fill:var(--pcac-reference-line-color, #adb5bd)}.pcac-line-area-chart .point-gauge-track{fill:none;stroke:var(--pcac-point-gauge-track-color, #e9ecef)}.pcac-line-area-chart .point-gauge-arc{fill:var(--pcac-point-gauge-color, var(--pcac-point-gauge-series-color))}.pcac-line-area-chart .corner-label{font-size:12px;font-weight:500;fill:var(--pcac-corner-label-color, #6c757d)}.pcac-line-area-chart .corner-labels,.pcac-line-area-chart .reference-line-labels{pointer-events:none}.pcac-line-area-chart .pcac-labels-on-top .corner-label,.pcac-line-area-chart .pcac-labels-on-top .reference-line-label{paint-order:stroke;stroke:var(--pcac-label-halo-color, #fff);stroke-width:3px;stroke-linejoin:round}.pcac-line-area-chart .point-ranges .point-range-series{--pcac-point-range-resolved-color: var(--pcac-point-range-color, var(--pcac-point-range-series-color))}.pcac-line-area-chart .point-ranges .point-range{opacity:var(--pcac-point-range-resting-opacity, 1);transition:opacity .15s ease-out}.pcac-line-area-chart .point-ranges .point-range.is-focused{opacity:1}.pcac-line-area-chart .point-ranges.pcac-range-hover{--pcac-point-range-resting-opacity: 0}.pcac-line-area-chart .point-ranges.pcac-range-faint{--pcac-point-range-resting-opacity: var(--pcac-point-range-faint-opacity, .2)}.pcac-line-area-chart .point-ranges.pcac-range-always.has-focus .point-range:not(.is-focused){opacity:.5}.pcac-line-area-chart .point-ranges .point-range-whisker,.pcac-line-area-chart .point-ranges .point-range-cap{stroke:var(--pcac-point-range-resolved-color);stroke-width:1.25px}.pcac-line-area-chart .point-ranges .point-range-box{fill:var(--pcac-point-range-resolved-color);fill-opacity:.1;stroke:var(--pcac-point-range-resolved-color);stroke-opacity:.7;stroke-width:1.25px}.pcac-line-area-chart .point-ranges .point-range-stop{stop-color:var(--pcac-point-range-resolved-color)}.pcac-line-area-chart .point-ranges .is-focused .point-range-whisker,.pcac-line-area-chart .point-ranges .is-focused .point-range-cap,.pcac-line-area-chart .point-ranges .is-focused .point-range-box{stroke-width:1.75px}.pcac-line-area-chart .point-ranges .is-focused .point-range-box{fill-opacity:.18}@media(prefers-reduced-motion:reduce){.pcac-line-area-chart .point-ranges .point-range{transition:none}}.pcac-line-area-chart .effects-canvas{fill:none}.pcac-line-area-chart .effect-line{stroke:var(--pcac-crosshair-line-color, #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:var(--pcac-crosshair-text-color, #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 });
4836
4914
  }
4837
4915
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: PcacLineAreaChartComponent, decorators: [{
4838
4916
  type: Component,
4839
- 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:var(--pcac-fan-out-spoke-color, #ced4da);stroke-width:1px}.pcac-line-area-chart .fan-out-anchor{fill:var(--pcac-fan-out-anchor-color, #6c757d)}.pcac-line-area-chart .reference-line-stroke{stroke:var(--pcac-reference-line-color, #adb5bd);stroke-width:1px;stroke-dasharray:4 4}.pcac-line-area-chart .reference-line-label{font-size:11px;fill:var(--pcac-reference-line-color, #adb5bd)}.pcac-line-area-chart .point-gauge-track{fill:none;stroke:var(--pcac-point-gauge-track-color, #e9ecef)}.pcac-line-area-chart .point-gauge-arc{fill:var(--pcac-point-gauge-color, var(--pcac-point-gauge-series-color))}.pcac-line-area-chart .corner-label{font-size:12px;font-weight:500;fill:var(--pcac-corner-label-color, #6c757d)}.pcac-line-area-chart .point-ranges .point-range-series{--pcac-point-range-resolved-color: var(--pcac-point-range-color, var(--pcac-point-range-series-color))}.pcac-line-area-chart .point-ranges .point-range{opacity:var(--pcac-point-range-resting-opacity, 1);transition:opacity .15s ease-out}.pcac-line-area-chart .point-ranges .point-range.is-focused{opacity:1}.pcac-line-area-chart .point-ranges.pcac-range-hover{--pcac-point-range-resting-opacity: 0}.pcac-line-area-chart .point-ranges.pcac-range-faint{--pcac-point-range-resting-opacity: var(--pcac-point-range-faint-opacity, .2)}.pcac-line-area-chart .point-ranges.pcac-range-always.has-focus .point-range:not(.is-focused){opacity:.5}.pcac-line-area-chart .point-ranges .point-range-whisker,.pcac-line-area-chart .point-ranges .point-range-cap{stroke:var(--pcac-point-range-resolved-color);stroke-width:1.25px}.pcac-line-area-chart .point-ranges .point-range-box{fill:var(--pcac-point-range-resolved-color);fill-opacity:.1;stroke:var(--pcac-point-range-resolved-color);stroke-opacity:.7;stroke-width:1.25px}.pcac-line-area-chart .point-ranges .point-range-stop{stop-color:var(--pcac-point-range-resolved-color)}.pcac-line-area-chart .point-ranges .is-focused .point-range-whisker,.pcac-line-area-chart .point-ranges .is-focused .point-range-cap,.pcac-line-area-chart .point-ranges .is-focused .point-range-box{stroke-width:1.75px}.pcac-line-area-chart .point-ranges .is-focused .point-range-box{fill-opacity:.18}@media(prefers-reduced-motion:reduce){.pcac-line-area-chart .point-ranges .point-range{transition:none}}.pcac-line-area-chart .effects-canvas{fill:none}.pcac-line-area-chart .effect-line{stroke:var(--pcac-crosshair-line-color, #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:var(--pcac-crosshair-text-color, #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"] }]
4917
+ 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:var(--pcac-fan-out-spoke-color, #ced4da);stroke-width:1px}.pcac-line-area-chart .fan-out-anchor{fill:var(--pcac-fan-out-anchor-color, #6c757d)}.pcac-line-area-chart .reference-line-stroke{stroke:var(--pcac-reference-line-color, #adb5bd);stroke-width:1px;stroke-dasharray:4 4}.pcac-line-area-chart .reference-line-label{font-size:11px;fill:var(--pcac-reference-line-color, #adb5bd)}.pcac-line-area-chart .point-gauge-track{fill:none;stroke:var(--pcac-point-gauge-track-color, #e9ecef)}.pcac-line-area-chart .point-gauge-arc{fill:var(--pcac-point-gauge-color, var(--pcac-point-gauge-series-color))}.pcac-line-area-chart .corner-label{font-size:12px;font-weight:500;fill:var(--pcac-corner-label-color, #6c757d)}.pcac-line-area-chart .corner-labels,.pcac-line-area-chart .reference-line-labels{pointer-events:none}.pcac-line-area-chart .pcac-labels-on-top .corner-label,.pcac-line-area-chart .pcac-labels-on-top .reference-line-label{paint-order:stroke;stroke:var(--pcac-label-halo-color, #fff);stroke-width:3px;stroke-linejoin:round}.pcac-line-area-chart .point-ranges .point-range-series{--pcac-point-range-resolved-color: var(--pcac-point-range-color, var(--pcac-point-range-series-color))}.pcac-line-area-chart .point-ranges .point-range{opacity:var(--pcac-point-range-resting-opacity, 1);transition:opacity .15s ease-out}.pcac-line-area-chart .point-ranges .point-range.is-focused{opacity:1}.pcac-line-area-chart .point-ranges.pcac-range-hover{--pcac-point-range-resting-opacity: 0}.pcac-line-area-chart .point-ranges.pcac-range-faint{--pcac-point-range-resting-opacity: var(--pcac-point-range-faint-opacity, .2)}.pcac-line-area-chart .point-ranges.pcac-range-always.has-focus .point-range:not(.is-focused){opacity:.5}.pcac-line-area-chart .point-ranges .point-range-whisker,.pcac-line-area-chart .point-ranges .point-range-cap{stroke:var(--pcac-point-range-resolved-color);stroke-width:1.25px}.pcac-line-area-chart .point-ranges .point-range-box{fill:var(--pcac-point-range-resolved-color);fill-opacity:.1;stroke:var(--pcac-point-range-resolved-color);stroke-opacity:.7;stroke-width:1.25px}.pcac-line-area-chart .point-ranges .point-range-stop{stop-color:var(--pcac-point-range-resolved-color)}.pcac-line-area-chart .point-ranges .is-focused .point-range-whisker,.pcac-line-area-chart .point-ranges .is-focused .point-range-cap,.pcac-line-area-chart .point-ranges .is-focused .point-range-box{stroke-width:1.75px}.pcac-line-area-chart .point-ranges .is-focused .point-range-box{fill-opacity:.18}@media(prefers-reduced-motion:reduce){.pcac-line-area-chart .point-ranges .point-range{transition:none}}.pcac-line-area-chart .effects-canvas{fill:none}.pcac-line-area-chart .effect-line{stroke:var(--pcac-crosshair-line-color, #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:var(--pcac-crosshair-text-color, #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"] }]
4840
4918
  }], 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 }] }] } });
4841
4919
 
4842
4920
  class PcacPlotChart {