@praxisui/charts 10.0.0-rc.40 → 10.0.0-rc.42
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-
|
|
3
|
+
"generatedAt": "2026-11-01T13:59:56.156Z",
|
|
4
4
|
"packageName": "@praxisui/charts",
|
|
5
|
-
"packageVersion": "10.0.0-rc.
|
|
5
|
+
"packageVersion": "10.0.0-rc.42",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 4,
|
|
@@ -749,11 +749,31 @@ class PraxisChartDataTransformerService {
|
|
|
749
749
|
return Math.min(...values);
|
|
750
750
|
case 'max':
|
|
751
751
|
return Math.max(...values);
|
|
752
|
+
case 'median':
|
|
753
|
+
return this.computeLinearPercentile(values, 0.5);
|
|
754
|
+
case 'percentile-90':
|
|
755
|
+
return this.computeLinearPercentile(values, 0.9);
|
|
756
|
+
case 'percentile-95':
|
|
757
|
+
return this.computeLinearPercentile(values, 0.95);
|
|
752
758
|
case 'sum':
|
|
753
759
|
default:
|
|
754
760
|
return values.reduce((sum, value) => sum + value, 0);
|
|
755
761
|
}
|
|
756
762
|
}
|
|
763
|
+
computeLinearPercentile(values, quantile) {
|
|
764
|
+
const sorted = [...values].sort((a, b) => a - b);
|
|
765
|
+
if (sorted.length === 1) {
|
|
766
|
+
return sorted[0];
|
|
767
|
+
}
|
|
768
|
+
const position = quantile * (sorted.length - 1);
|
|
769
|
+
const lowerIndex = Math.floor(position);
|
|
770
|
+
const upperIndex = Math.ceil(position);
|
|
771
|
+
if (lowerIndex === upperIndex) {
|
|
772
|
+
return sorted[lowerIndex];
|
|
773
|
+
}
|
|
774
|
+
const weight = position - lowerIndex;
|
|
775
|
+
return sorted[lowerIndex] + (sorted[upperIndex] - sorted[lowerIndex]) * weight;
|
|
776
|
+
}
|
|
757
777
|
extractMetricValue(row, seriesConfig) {
|
|
758
778
|
const field = seriesConfig.metric?.field;
|
|
759
779
|
if (!field) {
|
|
@@ -1983,6 +2003,9 @@ class PraxisChartCanonicalContractMapperService {
|
|
|
1983
2003
|
case 'avg':
|
|
1984
2004
|
case 'min':
|
|
1985
2005
|
case 'max':
|
|
2006
|
+
case 'median':
|
|
2007
|
+
case 'percentile-90':
|
|
2008
|
+
case 'percentile-95':
|
|
1986
2009
|
case 'count':
|
|
1987
2010
|
case 'distinct-count':
|
|
1988
2011
|
case 'sum':
|
|
@@ -2219,6 +2242,12 @@ class PraxisChartCanonicalContractMapperService {
|
|
|
2219
2242
|
return 'MIN';
|
|
2220
2243
|
case 'max':
|
|
2221
2244
|
return 'MAX';
|
|
2245
|
+
case 'median':
|
|
2246
|
+
return 'MEDIAN';
|
|
2247
|
+
case 'percentile-90':
|
|
2248
|
+
return 'PERCENTILE_90';
|
|
2249
|
+
case 'percentile-95':
|
|
2250
|
+
return 'PERCENTILE_95';
|
|
2222
2251
|
case 'avg-per-cycle-occurrence':
|
|
2223
2252
|
return 'AVG_PER_CYCLE_OCCURRENCE';
|
|
2224
2253
|
default:
|
|
@@ -2260,9 +2289,16 @@ class PraxisChartCanonicalContractMapperService {
|
|
|
2260
2289
|
case 'avg':
|
|
2261
2290
|
case 'min':
|
|
2262
2291
|
case 'max':
|
|
2292
|
+
case 'median':
|
|
2293
|
+
case 'percentile-90':
|
|
2294
|
+
case 'percentile-95':
|
|
2263
2295
|
case 'distinct-count':
|
|
2264
2296
|
case 'avg-per-cycle-occurrence':
|
|
2265
2297
|
return lower;
|
|
2298
|
+
case 'percentile_90':
|
|
2299
|
+
return 'percentile-90';
|
|
2300
|
+
case 'percentile_95':
|
|
2301
|
+
return 'percentile-95';
|
|
2266
2302
|
case 'distinct_count':
|
|
2267
2303
|
return 'distinct-count';
|
|
2268
2304
|
case 'avg_per_cycle_occurrence':
|
|
@@ -2723,7 +2759,11 @@ class PraxisChartStatsApiService {
|
|
|
2723
2759
|
? 'DISTINCT_COUNT'
|
|
2724
2760
|
: normalized === 'avg-per-cycle-occurrence'
|
|
2725
2761
|
? 'AVG_PER_CYCLE_OCCURRENCE'
|
|
2726
|
-
:
|
|
2762
|
+
: normalized === 'percentile-90'
|
|
2763
|
+
? 'PERCENTILE_90'
|
|
2764
|
+
: normalized === 'percentile-95'
|
|
2765
|
+
? 'PERCENTILE_95'
|
|
2766
|
+
: metric.toUpperCase()),
|
|
2727
2767
|
};
|
|
2728
2768
|
}
|
|
2729
2769
|
if ('operation' in metric && metric.operation) {
|
|
@@ -2742,7 +2782,11 @@ class PraxisChartStatsApiService {
|
|
|
2742
2782
|
? 'DISTINCT_COUNT'
|
|
2743
2783
|
: metric.aggregation === 'avg-per-cycle-occurrence'
|
|
2744
2784
|
? 'AVG_PER_CYCLE_OCCURRENCE'
|
|
2745
|
-
: metric.aggregation
|
|
2785
|
+
: metric.aggregation === 'percentile-90'
|
|
2786
|
+
? 'PERCENTILE_90'
|
|
2787
|
+
: metric.aggregation === 'percentile-95'
|
|
2788
|
+
? 'PERCENTILE_95'
|
|
2789
|
+
: metric.aggregation.toUpperCase());
|
|
2746
2790
|
const result = {
|
|
2747
2791
|
operation: op,
|
|
2748
2792
|
};
|
|
@@ -4053,6 +4097,12 @@ class PraxisChartComponent {
|
|
|
4053
4097
|
accessiblePointQuickViewRecord(point) {
|
|
4054
4098
|
return resolveChartPointQuickView(this.renderConfig(), point)?.record ?? null;
|
|
4055
4099
|
}
|
|
4100
|
+
accessiblePointQuickViewQueryContext() {
|
|
4101
|
+
const ctx = this.runtimeQueryContext();
|
|
4102
|
+
return ctx && typeof ctx === 'object'
|
|
4103
|
+
? ctx
|
|
4104
|
+
: undefined;
|
|
4105
|
+
}
|
|
4056
4106
|
handleShellKeydown(event) {
|
|
4057
4107
|
if (event.key !== 'Escape' || !this.activeQuickViewAnchor || !this.quickView) {
|
|
4058
4108
|
return;
|
|
@@ -4090,6 +4140,7 @@ class PraxisChartComponent {
|
|
|
4090
4140
|
sourceRecord: resolved.record,
|
|
4091
4141
|
anchor,
|
|
4092
4142
|
trigger: 'hover',
|
|
4143
|
+
queryContext: this.accessiblePointQuickViewQueryContext(),
|
|
4093
4144
|
});
|
|
4094
4145
|
}
|
|
4095
4146
|
handlePointHoverLeave() {
|
|
@@ -4794,6 +4845,7 @@ class PraxisChartComponent {
|
|
|
4794
4845
|
[attr.aria-pressed]="accessiblePointPressed(point)"
|
|
4795
4846
|
[praxisQuickView]="accessiblePointQuickViewBinding(point)"
|
|
4796
4847
|
[praxisQuickViewRecord]="accessiblePointQuickViewRecord(point)"
|
|
4848
|
+
[praxisQuickViewQueryContext]="accessiblePointQuickViewQueryContext()"
|
|
4797
4849
|
(click)="activateAccessiblePoint(point)"
|
|
4798
4850
|
>
|
|
4799
4851
|
{{ point.categoryLabel }}
|
|
@@ -5005,6 +5057,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
5005
5057
|
[attr.aria-pressed]="accessiblePointPressed(point)"
|
|
5006
5058
|
[praxisQuickView]="accessiblePointQuickViewBinding(point)"
|
|
5007
5059
|
[praxisQuickViewRecord]="accessiblePointQuickViewRecord(point)"
|
|
5060
|
+
[praxisQuickViewQueryContext]="accessiblePointQuickViewQueryContext()"
|
|
5008
5061
|
(click)="activateAccessiblePoint(point)"
|
|
5009
5062
|
>
|
|
5010
5063
|
{{ point.categoryLabel }}
|
|
@@ -7016,11 +7069,18 @@ class AnalyticsChartConfigAdapterService {
|
|
|
7016
7069
|
case 'avg':
|
|
7017
7070
|
case 'min':
|
|
7018
7071
|
case 'max':
|
|
7072
|
+
case 'median':
|
|
7073
|
+
case 'percentile-90':
|
|
7074
|
+
case 'percentile-95':
|
|
7019
7075
|
case 'count':
|
|
7020
7076
|
case 'distinct-count':
|
|
7021
7077
|
case 'sum':
|
|
7022
7078
|
case 'avg-per-cycle-occurrence':
|
|
7023
7079
|
return normalizedAggregation;
|
|
7080
|
+
case 'percentile_90':
|
|
7081
|
+
return 'percentile-90';
|
|
7082
|
+
case 'percentile_95':
|
|
7083
|
+
return 'percentile-95';
|
|
7024
7084
|
case 'avg_per_cycle_occurrence':
|
|
7025
7085
|
return 'avg-per-cycle-occurrence';
|
|
7026
7086
|
case '':
|
|
@@ -7902,6 +7962,7 @@ class EChartsOptionBuilderService {
|
|
|
7902
7962
|
universalTransition,
|
|
7903
7963
|
label: {
|
|
7904
7964
|
show: series.labelsVisible,
|
|
7965
|
+
hideOverlap: true,
|
|
7905
7966
|
color: textColor,
|
|
7906
7967
|
formatter: series.labelsVisible
|
|
7907
7968
|
? (params) => this.formatValue(params.value, this.seriesLabelFormat(config, series.id))
|
|
@@ -8038,6 +8099,7 @@ class EChartsOptionBuilderService {
|
|
|
8038
8099
|
areaStyle: series.area ? {} : undefined,
|
|
8039
8100
|
label: {
|
|
8040
8101
|
show: series.labelsVisible,
|
|
8102
|
+
hideOverlap: true,
|
|
8041
8103
|
color: textColor,
|
|
8042
8104
|
formatter: series.labelsVisible
|
|
8043
8105
|
? (params) => this.formatValue(params.value, this.seriesLabelFormat(config, series.id))
|
|
@@ -8807,6 +8869,9 @@ class EChartsEngineAdapter {
|
|
|
8807
8869
|
const chart = this.chart;
|
|
8808
8870
|
const nextStructuralSignature = this.resolveStructuralSignature(appearance.config);
|
|
8809
8871
|
if (!this.lastStructuralSignature || this.lastStructuralSignature !== nextStructuralSignature) {
|
|
8872
|
+
if (this.lastStructuralSignature) {
|
|
8873
|
+
chart.clear?.();
|
|
8874
|
+
}
|
|
8810
8875
|
chart.setOption(option, true);
|
|
8811
8876
|
}
|
|
8812
8877
|
else {
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/charts",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.42",
|
|
4
4
|
"description": "Metadata-driven charts library for Praxis UI Angular with engine adapters and Apache ECharts as the initial renderer.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
7
7
|
"@angular/core": "^21.0.0",
|
|
8
|
-
"@praxisui/core": "^10.0.0-rc.
|
|
8
|
+
"@praxisui/core": "^10.0.0-rc.42",
|
|
9
9
|
"@angular/forms": "^21.0.0",
|
|
10
10
|
"@angular/material": "^21.0.0",
|
|
11
|
-
"@praxisui/table": "^10.0.0-rc.
|
|
11
|
+
"@praxisui/table": "^10.0.0-rc.42",
|
|
12
12
|
"rxjs": "~7.8.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
@@ -28,14 +28,14 @@ type PraxisChartPrimitive = string | number | boolean | Date | null | undefined;
|
|
|
28
28
|
type PraxisChartDataRow = Record<string, PraxisChartPrimitive>;
|
|
29
29
|
interface PraxisChartQueryMetricConfig {
|
|
30
30
|
field?: string;
|
|
31
|
-
aggregation?: 'sum' | 'count' | 'distinct-count' | 'avg' | 'min' | 'max' | 'avg-per-cycle-occurrence';
|
|
31
|
+
aggregation?: 'sum' | 'count' | 'distinct-count' | 'avg' | 'min' | 'max' | 'median' | 'percentile-90' | 'percentile-95' | 'avg-per-cycle-occurrence';
|
|
32
32
|
alias?: string;
|
|
33
33
|
}
|
|
34
34
|
type PraxisChartStatsOperation = 'group-by' | 'timeseries' | 'distribution' | 'comparison';
|
|
35
35
|
type PraxisChartStatsDistributionMode = 'terms' | 'histogram';
|
|
36
36
|
type PraxisChartStatsOrderBy = 'key-asc' | 'key-desc' | 'value-asc' | 'value-desc';
|
|
37
37
|
type PraxisChartStatsGranularity = 'day' | 'week' | 'month';
|
|
38
|
-
type PraxisChartStatsMetricOperation = 'COUNT' | 'DISTINCT_COUNT' | 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'AVG_PER_CYCLE_OCCURRENCE';
|
|
38
|
+
type PraxisChartStatsMetricOperation = 'COUNT' | 'DISTINCT_COUNT' | 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'MEDIAN' | 'PERCENTILE_90' | 'PERCENTILE_95' | 'AVG_PER_CYCLE_OCCURRENCE';
|
|
39
39
|
interface PraxisChartStatsMetricRequest {
|
|
40
40
|
operation: PraxisChartStatsMetricOperation;
|
|
41
41
|
field?: string;
|
|
@@ -183,7 +183,7 @@ type PraxisChartRemoteDataResolverResult = PraxisChartDataRow[] | Promise<Praxis
|
|
|
183
183
|
type PraxisChartRemoteDataResolver = (event: PraxisChartQueryRequestEvent, config: PraxisChartConfig) => PraxisChartRemoteDataResolverResult;
|
|
184
184
|
|
|
185
185
|
type PraxisChartType = 'bar' | 'combo' | 'horizontal-bar' | 'line' | 'pie' | 'donut' | 'area' | 'stacked-bar' | 'stacked-area' | 'scatter' | 'funnel' | 'pyramid' | 'treemap' | 'gauge' | 'heatmap';
|
|
186
|
-
type PraxisChartAggregation = 'sum' | 'count' | 'distinct-count' | 'avg' | 'min' | 'max' | 'avg-per-cycle-occurrence';
|
|
186
|
+
type PraxisChartAggregation = 'sum' | 'count' | 'distinct-count' | 'avg' | 'min' | 'max' | 'median' | 'percentile-90' | 'percentile-95' | 'avg-per-cycle-occurrence';
|
|
187
187
|
interface PraxisChartMetricConfig {
|
|
188
188
|
field?: string;
|
|
189
189
|
aggregation?: PraxisChartAggregation;
|
|
@@ -371,7 +371,7 @@ type PraxisXUiChartStatsOrderBy = 'key-asc' | 'key-desc' | 'value-asc' | 'value-
|
|
|
371
371
|
type PraxisXUiChartComparisonPeriodPreset = 'TODAY' | 'YESTERDAY' | 'LAST_7_DAYS' | 'LAST_30_DAYS' | 'THIS_MONTH' | 'LAST_MONTH' | 'THIS_QUARTER' | 'THIS_YEAR';
|
|
372
372
|
type PraxisXUiChartComparisonPeriodMode = 'PREVIOUS_ALIGNED' | 'PREVIOUS_CALENDAR_PERIOD';
|
|
373
373
|
type PraxisXUiChartDimensionExtraction = 'NONE' | 'HOUR_OF_DAY' | 'DAY_OF_WEEK' | 'DAY_OF_MONTH' | 'MONTH_OF_YEAR' | 'QUARTER_OF_YEAR' | 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
|
|
374
|
-
type PraxisXUiChartAggregation = 'sum' | 'avg' | 'min' | 'max' | 'count' | 'distinct-count' | 'avg-per-cycle-occurrence';
|
|
374
|
+
type PraxisXUiChartAggregation = 'sum' | 'avg' | 'min' | 'max' | 'median' | 'percentile-90' | 'percentile-95' | 'count' | 'distinct-count' | 'avg-per-cycle-occurrence';
|
|
375
375
|
interface PraxisXUiChartFilter {
|
|
376
376
|
field: string;
|
|
377
377
|
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'between' | 'in' | 'contains';
|
|
@@ -637,6 +637,7 @@ declare class PraxisChartDataTransformerService {
|
|
|
637
637
|
private isAreaLikeSeries;
|
|
638
638
|
private transformScatter;
|
|
639
639
|
private aggregate;
|
|
640
|
+
private computeLinearPercentile;
|
|
640
641
|
private extractMetricValue;
|
|
641
642
|
private extractStrictMetricValue;
|
|
642
643
|
private normalizeCategory;
|
|
@@ -843,6 +844,7 @@ declare class PraxisChartComponent implements WidgetShellActionContributor {
|
|
|
843
844
|
toggleAccessibleData(): void;
|
|
844
845
|
accessiblePointQuickViewBinding(point: PraxisChartAccessiblePoint): ResourceQuickViewBinding | null;
|
|
845
846
|
accessiblePointQuickViewRecord(point: PraxisChartAccessiblePoint): Record<string, unknown> | null;
|
|
847
|
+
accessiblePointQuickViewQueryContext(): Record<string, unknown> | undefined;
|
|
846
848
|
handleShellKeydown(event: KeyboardEvent): void;
|
|
847
849
|
private handlePointHoverEnter;
|
|
848
850
|
private handlePointHoverLeave;
|