@pioneer-code/pioneer-charts 22.2.25 → 22.2.26

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/package.json CHANGED
@@ -30,7 +30,7 @@
30
30
  "type": "git",
31
31
  "url": "git+https://github.com/PioneerCode/pioneer-charts.git"
32
32
  },
33
- "version": "22.2.25",
33
+ "version": "22.2.26",
34
34
  "license": "MIT",
35
35
  "peerDependencies": {
36
36
  "@angular/core": "^22.1.0",
@@ -101,6 +101,11 @@
101
101
  font-size: 11px;
102
102
  fill: var(--pcac-axis-sub-label-color, #{imports.$gray-600});
103
103
  }
104
+
105
+ // A sub label zoomed out of view, pinned to the end of the axis nearest its value.
106
+ .pcac-axis-sub-label-out-of-view {
107
+ opacity: 0.6;
108
+ }
104
109
  }
105
110
 
106
111
  // Tick labels. d3-axis fills them `currentColor` by attribute; any stylesheet rule outranks
@@ -67,6 +67,10 @@
67
67
  font-size: 11px;
68
68
  fill: var(--pcac-axis-sub-label-color, #6c757d);
69
69
  }
70
+ .pcac-x-axis .pcac-axis-sub-label-out-of-view,
71
+ .pcac-y-axis .pcac-axis-sub-label-out-of-view {
72
+ opacity: 0.6;
73
+ }
70
74
 
71
75
  :where(.pcac-x-axis, .pcac-y-axis) :where(.tick) text {
72
76
  fill: var(--pcac-axis-tick-label-color, currentColor);
@@ -1 +1 @@
1
- .pcac-d3-tooltip{position:absolute;pointer-events:none;display:none;z-index:1000}.pcac-d3-tooltip-default{text-align:center;font-size:14px;padding:.5rem;background-color:rgba(52,58,64,.85);color:#fff;border-radius:2px}[data-pcac-mark]:focus{outline:none}[data-pcac-mark]:focus-visible{outline:2px solid var(--pcac-focus-ring-color, #343a40);outline-offset:2px}.pcac-arc path[data-pcac-mark]:focus-visible{outline:none;stroke:var(--pcac-focus-ring-color, #343a40);stroke-width:2px}.pcac-grid-rule line{stroke:var(--pcac-grid-color, #e9ecef)}.pcac-donut-center-label{fill:var(--pcac-donut-center-label-color, #343a40);font-weight:500}.pcac-donut-center-sub-label{fill:var(--pcac-donut-center-sub-label-color, #6c757d)}.pcac-x-axis path,.pcac-x-axis line,.pcac-y-axis path,.pcac-y-axis line{stroke:none}.pcac-x-axis.pcac-axis-tick-marks .tick line,.pcac-y-axis.pcac-axis-tick-marks .tick line{stroke:var(--pcac-axis-tick-color, #212529)}.pcac-x-axis.pcac-axis-line .domain,.pcac-y-axis.pcac-axis-line .domain{stroke:var(--pcac-axis-line-color, #212529)}.pcac-x-axis .pcac-axis-label,.pcac-y-axis .pcac-axis-label{font-size:12px;font-weight:600;fill:var(--pcac-axis-label-color, #495057)}.pcac-x-axis .pcac-axis-sub-label,.pcac-y-axis .pcac-axis-sub-label{font-size:11px;fill:var(--pcac-axis-sub-label-color, #6c757d)}:where(.pcac-x-axis,.pcac-y-axis) :where(.tick) text{fill:var(--pcac-axis-tick-label-color, currentColor)}
1
+ .pcac-d3-tooltip{position:absolute;pointer-events:none;display:none;z-index:1000}.pcac-d3-tooltip-default{text-align:center;font-size:14px;padding:.5rem;background-color:rgba(52,58,64,.85);color:#fff;border-radius:2px}[data-pcac-mark]:focus{outline:none}[data-pcac-mark]:focus-visible{outline:2px solid var(--pcac-focus-ring-color, #343a40);outline-offset:2px}.pcac-arc path[data-pcac-mark]:focus-visible{outline:none;stroke:var(--pcac-focus-ring-color, #343a40);stroke-width:2px}.pcac-grid-rule line{stroke:var(--pcac-grid-color, #e9ecef)}.pcac-donut-center-label{fill:var(--pcac-donut-center-label-color, #343a40);font-weight:500}.pcac-donut-center-sub-label{fill:var(--pcac-donut-center-sub-label-color, #6c757d)}.pcac-x-axis path,.pcac-x-axis line,.pcac-y-axis path,.pcac-y-axis line{stroke:none}.pcac-x-axis.pcac-axis-tick-marks .tick line,.pcac-y-axis.pcac-axis-tick-marks .tick line{stroke:var(--pcac-axis-tick-color, #212529)}.pcac-x-axis.pcac-axis-line .domain,.pcac-y-axis.pcac-axis-line .domain{stroke:var(--pcac-axis-line-color, #212529)}.pcac-x-axis .pcac-axis-label,.pcac-y-axis .pcac-axis-label{font-size:12px;font-weight:600;fill:var(--pcac-axis-label-color, #495057)}.pcac-x-axis .pcac-axis-sub-label,.pcac-y-axis .pcac-axis-sub-label{font-size:11px;fill:var(--pcac-axis-sub-label-color, #6c757d)}.pcac-x-axis .pcac-axis-sub-label-out-of-view,.pcac-y-axis .pcac-axis-sub-label-out-of-view{opacity:.6}:where(.pcac-x-axis,.pcac-y-axis) :where(.tick) text{fill:var(--pcac-axis-tick-label-color, currentColor)}
@@ -144,6 +144,10 @@ declare class PcacAxisConfig {
144
144
  * y axis they run bottom-to-top like the label, `min` at the bottom. The margin grows by
145
145
  * `PcacChart.AXIS_SUB_LABEL_SPACE` when any is set, shrinking the plot area. Not drawn on a
146
146
  * hidden axis. Styled by the theme's `.pcac-axis-sub-label` rule.
147
+ *
148
+ * On a zoomable line/area/plot axis each stands for the value at its spot on the unzoomed axis
149
+ * and moves with it. Zoomed out of view, the nearest on each side is pinned to that end with an
150
+ * arrow toward its value (`.pcac-axis-sub-label-out-of-view`, dimmed by the theme).
147
151
  */
148
152
  subLabels?: PcacAxisSubLabels;
149
153
  /** `subLabels` color, all three (`--pcac-axis-sub-label-color`). Theme default `$gray-600`. */
@@ -592,16 +596,28 @@ declare class PcacReferenceLine {
592
596
  }
593
597
  /**
594
598
  * Text pinned to the plot area's corners (see `PcacLineAreaChartConfig.cornerLabels`) - names for
595
- * the regions the plot divides into, such as the quadrants between two reference lines. Pinned to
596
- * the plot's frame rather than to data, so they stay put when the chart is zoomed. Drawn under the
597
- * series, so a point in the corner covers its label rather than the other way round, unless the
598
- * chart sets `labelsOnTop`. Any corner left unset is left empty.
599
+ * the regions the plot divides into, such as the quadrants between two reference lines. Drawn in
600
+ * the corners of the plot's frame, so they stay put when the chart is zoomed - give `split` to have
601
+ * each one shown only while its region is still in its corner. Drawn under the series, so a point in
602
+ * the corner covers its label rather than the other way round, unless the chart sets `labelsOnTop`.
603
+ * Any corner left unset is left empty.
599
604
  */
600
605
  declare class PcacCornerLabels {
601
606
  topLeft?: string;
602
607
  topRight?: string;
603
608
  bottomLeft?: string;
604
609
  bottomRight?: string;
610
+ /**
611
+ * Where the regions divide, in each axis's own terms (as `PcacReferenceLine.value`): `x` splits
612
+ * left from right, `y` bottom from top; leave one out for halves. With it, a label is shown only
613
+ * while its region fills its corner of the view with room for it - zoomed into one quadrant, only
614
+ * that quadrant's name is left, rather than all four naming points that aren't theirs. Without
615
+ * it the labels are always shown.
616
+ */
617
+ split?: {
618
+ x?: number | string;
619
+ y?: number | string;
620
+ };
605
621
  /**
606
622
  * Any CSS color for all four. Theme default `$gray-600`. Applied as `--pcac-corner-label-color`
607
623
  * on their group, so a stylesheet can set it on an ancestor instead (a config value wins).