@pioneer-code/pioneer-charts 22.2.7 → 22.2.10
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
|
@@ -23,6 +23,78 @@
|
|
|
23
23
|
fill: var(--pcac-fan-out-anchor-color, #{imports.$gray-600});
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
// `pointRange` (see PcacPointRangeConfig): each point's `range`, drawn by the builder into a
|
|
27
|
+
// `.point-range` group per point, a `.point-range-series` group per series, and one
|
|
28
|
+
// `.point-ranges` group for the chart. Color is the config's `color` when set
|
|
29
|
+
// (`--pcac-point-range-color`, on `.point-ranges`, or a stylesheet's on any ancestor), else the
|
|
30
|
+
// series' own (`--pcac-point-range-series-color`, which the builder sets on each series group).
|
|
31
|
+
// The `pcac-range-<show>` class picks how strongly a range shows at rest; hover marks one
|
|
32
|
+
// `.is-focused` and the chart's `.point-ranges` `.has-focus`.
|
|
33
|
+
.point-ranges {
|
|
34
|
+
// Resolved on the series group, not here: a `var()` in a custom property is substituted where
|
|
35
|
+
// it's declared, and the series color only exists from the series group down.
|
|
36
|
+
.point-range-series {
|
|
37
|
+
--pcac-point-range-resolved-color: var(--pcac-point-range-color, var(--pcac-point-range-series-color));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.point-range {
|
|
41
|
+
opacity: var(--pcac-point-range-resting-opacity, 1);
|
|
42
|
+
transition: opacity 150ms ease-out;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.point-range.is-focused {
|
|
46
|
+
opacity: 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.pcac-range-hover {
|
|
50
|
+
--pcac-point-range-resting-opacity: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.pcac-range-faint {
|
|
54
|
+
--pcac-point-range-resting-opacity: var(--pcac-point-range-faint-opacity, 0.2);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.pcac-range-always.has-focus .point-range:not(.is-focused) {
|
|
58
|
+
opacity: 0.5;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.point-range-whisker,
|
|
62
|
+
.point-range-cap {
|
|
63
|
+
stroke: var(--pcac-point-range-resolved-color);
|
|
64
|
+
stroke-width: 1.25px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.point-range-box {
|
|
68
|
+
fill: var(--pcac-point-range-resolved-color);
|
|
69
|
+
fill-opacity: 0.1;
|
|
70
|
+
stroke: var(--pcac-point-range-resolved-color);
|
|
71
|
+
stroke-opacity: 0.7;
|
|
72
|
+
stroke-width: 1.25px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.point-range-stop {
|
|
76
|
+
stop-color: var(--pcac-point-range-resolved-color);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.is-focused {
|
|
80
|
+
.point-range-whisker,
|
|
81
|
+
.point-range-cap,
|
|
82
|
+
.point-range-box {
|
|
83
|
+
stroke-width: 1.75px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.point-range-box {
|
|
87
|
+
fill-opacity: 0.18;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@media (prefers-reduced-motion: reduce) {
|
|
92
|
+
.point-range {
|
|
93
|
+
transition: none;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
26
98
|
.effects-canvas {
|
|
27
99
|
fill: none;
|
|
28
100
|
}
|
|
@@ -213,6 +213,34 @@ declare class PcacData {
|
|
|
213
213
|
* existing object-literal / JSON data doesn't have to declare it.
|
|
214
214
|
*/
|
|
215
215
|
image?: string;
|
|
216
|
+
/**
|
|
217
|
+
* The span this point's `key` / `value` stands for, when the point is really the middle of a
|
|
218
|
+
* range: `x` for the key, `y` for the value, either or both. Currently honored by the
|
|
219
|
+
* line/area/plot charts only, on the innermost (point-level) `PcacData`, and only drawn when
|
|
220
|
+
* the chart config turns `pointRange` on (see `PcacPointRangeConfig`). Nothing is labeled on
|
|
221
|
+
* the chart; a custom tooltip can read it off the point.
|
|
222
|
+
*
|
|
223
|
+
* Optional for the same reason as `image`.
|
|
224
|
+
*/
|
|
225
|
+
range?: PcacDataRange;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* One side of a `PcacDataRange`. `min` above `max` is read as the other way round; `min` equal to
|
|
229
|
+
* `max` (or either missing) as no range on that axis.
|
|
230
|
+
*/
|
|
231
|
+
declare class PcacRangeBounds<T> {
|
|
232
|
+
min: T;
|
|
233
|
+
max: T;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* `PcacData.range`. `x` is read the way the point's `key` is, per the chart's `xAxis.format`: a
|
|
237
|
+
* number for `Decimal`, anything `new Date()` accepts for `DateTime`, and for every index-based
|
|
238
|
+
* format a (possibly fractional) index - `{ min: 2.5, max: 3.5 }` is half a slot either side of
|
|
239
|
+
* the fourth point. `y` is on the value axis.
|
|
240
|
+
*/
|
|
241
|
+
declare class PcacDataRange {
|
|
242
|
+
x?: PcacRangeBounds<number | string>;
|
|
243
|
+
y?: PcacRangeBounds<number>;
|
|
216
244
|
}
|
|
217
245
|
declare enum PcacFormatEnum {
|
|
218
246
|
None = "none",
|
|
@@ -906,6 +934,45 @@ declare class PcacPointImageConfig {
|
|
|
906
934
|
maxWidth: number;
|
|
907
935
|
maxHeight: number;
|
|
908
936
|
}
|
|
937
|
+
/** How a point's `range` is drawn (see `PcacPointRangeConfig.style`). */
|
|
938
|
+
declare enum PcacPointRangeStyle {
|
|
939
|
+
/** Error bars: a line across each range, capped at both ends. */
|
|
940
|
+
Whiskers = "whiskers",
|
|
941
|
+
/** A rectangle spanning the x range by the y range; a thin strip when only one is set. */
|
|
942
|
+
Box = "box",
|
|
943
|
+
/**
|
|
944
|
+
* A fill strongest at the point's value and fading out to the range's edges: an oval glow
|
|
945
|
+
* with both ranges (brightest on the value, even off-center), a fading bar with one.
|
|
946
|
+
*/
|
|
947
|
+
Fade = "fade"
|
|
948
|
+
}
|
|
949
|
+
/** When a point's `range` shows (see `PcacPointRangeConfig.show`). */
|
|
950
|
+
declare enum PcacPointRangeShow {
|
|
951
|
+
/** Only the hovered point's range. */
|
|
952
|
+
Hover = "hover",
|
|
953
|
+
/** Every range at `faintOpacity`, the hovered point's at full strength. */
|
|
954
|
+
Faint = "faint",
|
|
955
|
+
/** Every range at full strength; the others dim while a point is hovered. */
|
|
956
|
+
Always = "always"
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* Drawing for `PcacData.range` on the line/area/plot charts. Ranges sit above the lines/areas and
|
|
960
|
+
* below the points, on the point's true coordinate (a fanned-out point's range stays on its
|
|
961
|
+
* anchor), clipped to the plot area and following zoom. The chart draws no numbers for them; a
|
|
962
|
+
* custom tooltip gets the point, `range` included.
|
|
963
|
+
*/
|
|
964
|
+
declare class PcacPointRangeConfig {
|
|
965
|
+
style: PcacPointRangeStyle;
|
|
966
|
+
show: PcacPointRangeShow;
|
|
967
|
+
/** Opacity of the ranges at rest under `show: Faint`, 0 - 1. */
|
|
968
|
+
faintOpacity: number;
|
|
969
|
+
/**
|
|
970
|
+
* Any CSS color for every range on the chart. Unset, each takes its series' color. Applied as
|
|
971
|
+
* `--pcac-point-range-color` on the chart's `.point-ranges` group, so a stylesheet can set it
|
|
972
|
+
* on an ancestor instead (a config value wins).
|
|
973
|
+
*/
|
|
974
|
+
color?: string;
|
|
975
|
+
}
|
|
909
976
|
/**
|
|
910
977
|
* The axes' `format` and `domainMin`/`domainMax` (`PcacAxisConfig`) do more here than on the bar
|
|
911
978
|
* charts. `yAxis.domainMin`/`domainMax` are the y scale's domain (default 0..100). `xAxis.format`
|
|
@@ -934,6 +1001,11 @@ declare class PcacLineAreaChartConfig extends PcacAxisChartConfig {
|
|
|
934
1001
|
* on their data still gets a sensibly-sized result.
|
|
935
1002
|
*/
|
|
936
1003
|
pointImage?: Partial<PcacPointImageConfig>;
|
|
1004
|
+
/**
|
|
1005
|
+
* Draw each point's `range` (see `PcacData.range`). Off when not set; `{}` turns it on with
|
|
1006
|
+
* every `PcacPointRangeConfig` default. Points without a `range` draw nothing extra.
|
|
1007
|
+
*/
|
|
1008
|
+
pointRange?: Partial<PcacPointRangeConfig>;
|
|
937
1009
|
}
|
|
938
1010
|
|
|
939
1011
|
/**
|
|
@@ -1070,5 +1142,5 @@ declare class PcacPieChartComponent {
|
|
|
1070
1142
|
static ɵcmp: i0.ɵɵComponentDeclaration<PcacPieChartComponent, "pcac-pie-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "sliceClicked": "sliceClicked"; }, ["tooltipTemplate"], never, true, never>;
|
|
1071
1143
|
}
|
|
1072
1144
|
|
|
1073
|
-
export { BarHorizontalChartBuilder, BarVerticalChartBuilder, PCAC_AXIS_LABEL_SPACE, PCAC_AXIS_SUB_LABEL_SPACE, PcacAreaChart, PcacAreaChartConfig, PcacAxisBuilder, PcacAxisChartConfig, PcacAxisConfig, PcacAxisSubLabels, PcacBarHorizontalChartColorOverrideConfig, PcacBarHorizontalChartComponent, PcacBarHorizontalChartConfig, PcacBarVerticalChartColorOverrideConfig, PcacBarVerticalChartComponent, PcacBarVerticalChartConfig, PcacChart, PcacChartConfig, PcacChartResizeService, PcacColorService, PcacData, PcacFormatEnum, PcacGridBuilder, PcacLegend, PcacLegendConfig, PcacLegendConfigItem, PcacLineChart, PcacLineChartConfig, PcacPieChartComponent, PcacPieChartConfig, PcacPlotChart, PcacPlotChartConfig, PcacPointFanOutConfig, PcacPointImageConfig, PcacTooltipBuilder, PcacTooltipDirective, PcacTransitionService, PieChartBuilder, axisLabelSpace, hasAxisSubLabels, resolveAxisConfig };
|
|
1145
|
+
export { BarHorizontalChartBuilder, BarVerticalChartBuilder, PCAC_AXIS_LABEL_SPACE, PCAC_AXIS_SUB_LABEL_SPACE, PcacAreaChart, PcacAreaChartConfig, PcacAxisBuilder, PcacAxisChartConfig, PcacAxisConfig, PcacAxisSubLabels, PcacBarHorizontalChartColorOverrideConfig, PcacBarHorizontalChartComponent, PcacBarHorizontalChartConfig, PcacBarVerticalChartColorOverrideConfig, PcacBarVerticalChartComponent, PcacBarVerticalChartConfig, PcacChart, PcacChartConfig, PcacChartResizeService, PcacColorService, PcacData, PcacDataRange, PcacFormatEnum, PcacGridBuilder, PcacLegend, PcacLegendConfig, PcacLegendConfigItem, PcacLineChart, PcacLineChartConfig, PcacPieChartComponent, PcacPieChartConfig, PcacPlotChart, PcacPlotChartConfig, PcacPointFanOutConfig, PcacPointImageConfig, PcacPointRangeConfig, PcacPointRangeShow, PcacPointRangeStyle, PcacRangeBounds, PcacTooltipBuilder, PcacTooltipDirective, PcacTransitionService, PieChartBuilder, axisLabelSpace, hasAxisSubLabels, resolveAxisConfig };
|
|
1074
1146
|
export type { IPcacAxisBuilderConfig, IPcacGridBuilderConfig, PcacChartMargin, PcacResolvedAxisConfig, PcacTooltipCoincident, PcacTooltipContext, PcacTooltipOptions };
|