@praxisui/charts 10.0.0-rc.69 → 10.0.0-rc.70
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-11-
|
|
3
|
+
"generatedAt": "2026-11-28T16:41:23.066Z",
|
|
4
4
|
"packageName": "@praxisui/charts",
|
|
5
|
-
"packageVersion": "10.0.0-rc.
|
|
5
|
+
"packageVersion": "10.0.0-rc.70",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 13,
|
|
@@ -3941,8 +3941,8 @@ class PraxisChartDataTransformerService {
|
|
|
3941
3941
|
const resolvedType = this.resolveCartesianSeriesType(config, seriesConfig);
|
|
3942
3942
|
const areaLike = this.isAreaLikeSeries(config, seriesConfig);
|
|
3943
3943
|
const step = seriesConfig.step;
|
|
3944
|
-
const smooth = step ? false : (seriesConfig.smooth ?? areaLike);
|
|
3945
3944
|
const bandsConfig = seriesConfig.confidenceBands ?? [];
|
|
3945
|
+
const smooth = step || bandsConfig.length > 0 ? false : (seriesConfig.smooth ?? areaLike);
|
|
3946
3946
|
const bandPoints = bandsConfig.map(() => []);
|
|
3947
3947
|
const errorBarConfig = seriesConfig.errorBar;
|
|
3948
3948
|
const errorBarPoints = [];
|
|
@@ -6555,6 +6555,7 @@ class PraxisChartCanonicalContractMapperService {
|
|
|
6555
6555
|
id: normalizedContract.chartId,
|
|
6556
6556
|
type: normalizedContract.kind,
|
|
6557
6557
|
orientation: this.resolveOrientation(normalizedContract),
|
|
6558
|
+
...(normalizedContract.yAxisInverse ? { yAxisInverse: true } : {}),
|
|
6558
6559
|
title: this.mapTextValue(normalizedContract.title),
|
|
6559
6560
|
subtitle: this.mapTextValue(normalizedContract.subtitle),
|
|
6560
6561
|
sizing: normalizedContract.sizing,
|
|
@@ -6710,6 +6711,7 @@ class PraxisChartCanonicalContractMapperService {
|
|
|
6710
6711
|
kind,
|
|
6711
6712
|
chartId: config.id,
|
|
6712
6713
|
orientation,
|
|
6714
|
+
...(config.yAxisInverse ? { yAxisInverse: true } : {}),
|
|
6713
6715
|
title: this.toCanonicalTextValue(config.title),
|
|
6714
6716
|
subtitle: this.toCanonicalTextValue(config.subtitle),
|
|
6715
6717
|
sizing: this.extractCanonicalSizing(config),
|
|
@@ -6971,6 +6973,7 @@ class PraxisChartCanonicalContractMapperService {
|
|
|
6971
6973
|
field: firstDimensionField,
|
|
6972
6974
|
label: this.toLabel(firstDimension?.label),
|
|
6973
6975
|
type: firstDimension?.role === 'time' ? 'time' : 'category',
|
|
6976
|
+
...(firstDimension?.inverse || contract.yAxisInverse ? { inverse: true } : {}),
|
|
6974
6977
|
},
|
|
6975
6978
|
y: {
|
|
6976
6979
|
label: metricCount > 1 ? undefined : this.toLabel(firstMetric?.label),
|
|
@@ -7014,6 +7017,7 @@ class PraxisChartCanonicalContractMapperService {
|
|
|
7014
7017
|
: undefined;
|
|
7015
7018
|
return periods.map((period) => {
|
|
7016
7019
|
const hasStep = metric.step !== undefined && metric.step !== false;
|
|
7020
|
+
const hasConfidenceBands = Array.isArray(metric.confidenceBands) && metric.confidenceBands.length > 0;
|
|
7017
7021
|
return {
|
|
7018
7022
|
id: period ? `${metric.field}-${period}` : `${metric.field}-${index + 1}`,
|
|
7019
7023
|
name: period ? `${baseName} (${this.comparisonPeriodLabel(period)})` : baseName,
|
|
@@ -7044,7 +7048,11 @@ class PraxisChartCanonicalContractMapperService {
|
|
|
7044
7048
|
...(metric.format ? { format: metric.format } : {}),
|
|
7045
7049
|
}
|
|
7046
7050
|
: undefined,
|
|
7047
|
-
smooth: hasStep
|
|
7051
|
+
smooth: hasStep || hasConfidenceBands
|
|
7052
|
+
? false
|
|
7053
|
+
: metric.smooth !== undefined
|
|
7054
|
+
? metric.smooth
|
|
7055
|
+
: this.shouldSmoothSeries(contract.kind, metric.seriesKind),
|
|
7048
7056
|
...(metric.lineStyle !== undefined ? { lineStyle: metric.lineStyle } : {}),
|
|
7049
7057
|
...(metric.step !== undefined ? { step: metric.step } : {}),
|
|
7050
7058
|
...(metric.connectNulls !== undefined ? { connectNulls: metric.connectNulls } : {}),
|
|
@@ -7306,9 +7314,16 @@ class PraxisChartCanonicalContractMapperService {
|
|
|
7306
7314
|
toLabel(value) {
|
|
7307
7315
|
if (!value)
|
|
7308
7316
|
return undefined;
|
|
7309
|
-
if (typeof value === 'string')
|
|
7310
|
-
|
|
7311
|
-
|
|
7317
|
+
if (typeof value === 'string') {
|
|
7318
|
+
const trimmed = value.trim();
|
|
7319
|
+
return trimmed || undefined;
|
|
7320
|
+
}
|
|
7321
|
+
const candidate = value;
|
|
7322
|
+
const resolved = (typeof candidate.fallback === 'string' && candidate.fallback.trim()) ||
|
|
7323
|
+
(typeof candidate.text === 'string' && candidate.text.trim()) ||
|
|
7324
|
+
(typeof candidate.key === 'string' && candidate.key.trim()) ||
|
|
7325
|
+
'';
|
|
7326
|
+
return resolved || undefined;
|
|
7312
7327
|
}
|
|
7313
7328
|
resolveToggle(value, defaultValue = false) {
|
|
7314
7329
|
if (typeof value === 'boolean')
|
|
@@ -8022,6 +8037,7 @@ class PraxisChartCanonicalContractMapperService {
|
|
|
8022
8037
|
...(label !== undefined ? { label } : {}),
|
|
8023
8038
|
...(role ? { role } : {}),
|
|
8024
8039
|
...(format ? { format } : {}),
|
|
8040
|
+
...(config.axes?.x?.inverse ? { inverse: true } : {}),
|
|
8025
8041
|
};
|
|
8026
8042
|
const extraFields = (remoteQuery?.dimensions ?? [])
|
|
8027
8043
|
.slice(1)
|
|
@@ -8080,6 +8096,7 @@ class PraxisChartCanonicalContractMapperService {
|
|
|
8080
8096
|
...(axis ? { axis } : {}),
|
|
8081
8097
|
...(color ? { color } : {}),
|
|
8082
8098
|
...(format ? { format } : {}),
|
|
8099
|
+
...(s.smooth !== undefined ? { smooth: s.smooth } : {}),
|
|
8083
8100
|
...(s.lineStyle !== undefined ? { lineStyle: s.lineStyle } : {}),
|
|
8084
8101
|
...(s.step !== undefined ? { step: s.step } : {}),
|
|
8085
8102
|
...(s.connectNulls !== undefined ? { connectNulls: s.connectNulls } : {}),
|
|
@@ -24255,6 +24272,11 @@ const PRAXIS_CHARTS_EN_US = {
|
|
|
24255
24272
|
'praxis.charts.runtime.intervalSummary': '{{ label }}: {{ low }} – {{ high }}',
|
|
24256
24273
|
'praxis.charts.runtime.confidenceBandFallback': 'Confidence band',
|
|
24257
24274
|
'praxis.charts.runtime.errorBarFallback': 'Confidence interval',
|
|
24275
|
+
'praxis.charts.runtime.sensitivityRange': 'P10–P90 range: {{ low }} – {{ high }}',
|
|
24276
|
+
'praxis.charts.runtime.sensitivityCorrelation': 'Spearman correlation: {{ value }} ({{ direction }})',
|
|
24277
|
+
'praxis.charts.runtime.sensitivityDirectionPositive': 'positive (+)',
|
|
24278
|
+
'praxis.charts.runtime.sensitivityDirectionNegative': 'negative (−)',
|
|
24279
|
+
'praxis.charts.runtime.sensitivityDirectionNeutral': 'neutral',
|
|
24258
24280
|
'praxis.charts.runtime.suppressedGapLabel': 'Suppressed (k-anonymity)',
|
|
24259
24281
|
'praxis.charts.runtime.confidenceBandInvertedBounds': 'The confidence band for series "{{ series }}" has a lower bound greater than the upper bound or non-finite values.',
|
|
24260
24282
|
'praxis.charts.runtime.errorBarInvertedBounds': 'The error bar for series "{{ series }}" has a lower bound greater than the upper bound or non-finite values.',
|
|
@@ -25469,6 +25491,11 @@ const PRAXIS_CHARTS_PT_BR = {
|
|
|
25469
25491
|
'praxis.charts.runtime.intervalSummary': '{{ label }}: {{ low }} – {{ high }}',
|
|
25470
25492
|
'praxis.charts.runtime.confidenceBandFallback': 'Faixa de confiança',
|
|
25471
25493
|
'praxis.charts.runtime.errorBarFallback': 'Intervalo de confiança',
|
|
25494
|
+
'praxis.charts.runtime.sensitivityRange': 'Faixa P10–P90: {{ low }} – {{ high }}',
|
|
25495
|
+
'praxis.charts.runtime.sensitivityCorrelation': 'Correlação de Spearman: {{ value }} ({{ direction }})',
|
|
25496
|
+
'praxis.charts.runtime.sensitivityDirectionPositive': 'direta (+)',
|
|
25497
|
+
'praxis.charts.runtime.sensitivityDirectionNegative': 'inversa (−)',
|
|
25498
|
+
'praxis.charts.runtime.sensitivityDirectionNeutral': 'neutra',
|
|
25472
25499
|
'praxis.charts.runtime.suppressedGapLabel': 'Omitido por k-anonimato',
|
|
25473
25500
|
'praxis.charts.runtime.confidenceBandInvertedBounds': 'A faixa de confiança da série "{{ series }}" contém limite inferior maior que o superior ou valores não finitos.',
|
|
25474
25501
|
'praxis.charts.runtime.errorBarInvertedBounds': 'A barra de erro da série "{{ series }}" contém limite inferior maior que o superior ou valores não finitos.',
|
|
@@ -31341,6 +31368,7 @@ class EChartsOptionBuilderService {
|
|
|
31341
31368
|
const hasSecondarySeries = secondarySeriesIndex >= 0;
|
|
31342
31369
|
const hasDualValueAxes = Boolean(config.axes?.ySecondary) || hasSecondarySeries;
|
|
31343
31370
|
const hasUncertainty = this.hasUncertaintyIntervals(transformed);
|
|
31371
|
+
const hasSensitivityTooltip = this.hasSensitivityTooltipMetadata(transformed);
|
|
31344
31372
|
const cartesianSeries = transformed.series.map((series, index) => {
|
|
31345
31373
|
const seriesConfig = this.findSeriesConfig(config, series.id);
|
|
31346
31374
|
const comparisonBaseField = this.parseComparisonCurrentSeriesField(seriesConfig?.metric?.field);
|
|
@@ -31367,7 +31395,7 @@ class EChartsOptionBuilderService {
|
|
|
31367
31395
|
yAxisIndex: isSecondarySeries ? 1 : 0,
|
|
31368
31396
|
}),
|
|
31369
31397
|
stack: series.stack,
|
|
31370
|
-
smooth: series.smooth,
|
|
31398
|
+
smooth: (series.confidenceBands?.length ?? 0) > 0 ? false : series.smooth,
|
|
31371
31399
|
...(isLineSeries && series.lineStyle && series.lineStyle !== 'solid'
|
|
31372
31400
|
? { lineStyle: { type: series.lineStyle } }
|
|
31373
31401
|
: {}),
|
|
@@ -31398,7 +31426,9 @@ class EChartsOptionBuilderService {
|
|
|
31398
31426
|
backgroundColor: config.theme?.backgroundColor,
|
|
31399
31427
|
color: palette,
|
|
31400
31428
|
title: this.buildTitle(config, 'left', textColor),
|
|
31401
|
-
tooltip: tooltipEnabled
|
|
31429
|
+
tooltip: tooltipEnabled
|
|
31430
|
+
? this.buildCartesianTooltip(config, hasUncertainty || hasSensitivityTooltip)
|
|
31431
|
+
: undefined,
|
|
31402
31432
|
legend: this.buildLegend(config, legendVisible, 'bottom', textColor),
|
|
31403
31433
|
grid: this.buildGrid(config, { horizontal, legendVisible }),
|
|
31404
31434
|
...(dataZoom ? { dataZoom } : {}),
|
|
@@ -31435,6 +31465,9 @@ class EChartsOptionBuilderService {
|
|
|
31435
31465
|
name: config.axes?.x?.label,
|
|
31436
31466
|
nameTextStyle: { color: textColor },
|
|
31437
31467
|
data: transformed.categories,
|
|
31468
|
+
...(config.yAxisInverse || config.axes?.x?.inverse || config.axes?.y?.inverse
|
|
31469
|
+
? { inverse: true }
|
|
31470
|
+
: {}),
|
|
31438
31471
|
axisLabel: {
|
|
31439
31472
|
show: config.axes?.x?.labels?.visible ?? true,
|
|
31440
31473
|
color: textColor,
|
|
@@ -32373,8 +32406,36 @@ class EChartsOptionBuilderService {
|
|
|
32373
32406
|
}
|
|
32374
32407
|
}
|
|
32375
32408
|
lines.push(...this.formatTooltipIntervalLines(itemData, format));
|
|
32409
|
+
lines.push(...this.formatTooltipSensitivityLines(itemData, format));
|
|
32376
32410
|
return lines.join('<br/>');
|
|
32377
32411
|
}
|
|
32412
|
+
formatTooltipSensitivityLines(itemData, format) {
|
|
32413
|
+
const output = [];
|
|
32414
|
+
const p10 = this.readFiniteSensitivityNumber(itemData['p10Outcome'] ?? itemData['p10ConditionalOutcome']);
|
|
32415
|
+
const p90 = this.readFiniteSensitivityNumber(itemData['p90Outcome'] ?? itemData['p90ConditionalOutcome']);
|
|
32416
|
+
if (p10 !== null && p90 !== null) {
|
|
32417
|
+
const lowText = this.formatValue(p10, format);
|
|
32418
|
+
const highText = this.formatValue(p90, format);
|
|
32419
|
+
if (lowText && highText) {
|
|
32420
|
+
output.push(escapeTooltipHtml(this.t('praxis.charts.runtime.sensitivityRange', `P10–P90 range: ${lowText} – ${highText}`, { low: lowText, high: highText })));
|
|
32421
|
+
}
|
|
32422
|
+
}
|
|
32423
|
+
const corr = this.readFiniteSensitivityNumber(itemData['rankCorrelation'] ?? itemData['spearmanCorrelation']);
|
|
32424
|
+
if (corr !== null) {
|
|
32425
|
+
const normalizedCorr = Math.abs(corr) < 0.0005 ? 0 : corr;
|
|
32426
|
+
const formattedCorr = `${normalizedCorr > 0 ? '+' : ''}${normalizedCorr.toFixed(2)}`;
|
|
32427
|
+
const direction = normalizedCorr > 0
|
|
32428
|
+
? this.t('praxis.charts.runtime.sensitivityDirectionPositive', 'positive (+)')
|
|
32429
|
+
: normalizedCorr < 0
|
|
32430
|
+
? this.t('praxis.charts.runtime.sensitivityDirectionNegative', 'negative (−)')
|
|
32431
|
+
: this.t('praxis.charts.runtime.sensitivityDirectionNeutral', 'neutral');
|
|
32432
|
+
output.push(escapeTooltipHtml(this.t('praxis.charts.runtime.sensitivityCorrelation', `Spearman correlation: ${formattedCorr} (${direction})`, { value: formattedCorr, direction })));
|
|
32433
|
+
}
|
|
32434
|
+
return output;
|
|
32435
|
+
}
|
|
32436
|
+
readFiniteSensitivityNumber(value) {
|
|
32437
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : null;
|
|
32438
|
+
}
|
|
32378
32439
|
formatTooltipIntervalLines(itemData, format) {
|
|
32379
32440
|
const output = [];
|
|
32380
32441
|
const bands = itemData['__praxisConfidenceBands'];
|
|
@@ -32661,6 +32722,17 @@ class EChartsOptionBuilderService {
|
|
|
32661
32722
|
hasUncertaintyIntervals(transformed) {
|
|
32662
32723
|
return transformed.series.some((series) => Boolean(series.hasSuppressedGaps || series.confidenceBands?.length || series.errorBar));
|
|
32663
32724
|
}
|
|
32725
|
+
hasSensitivityTooltipMetadata(transformed) {
|
|
32726
|
+
return transformed.series.some((series) => series.points.some((point) => {
|
|
32727
|
+
if (!point || typeof point !== 'object' || Array.isArray(point)) {
|
|
32728
|
+
return false;
|
|
32729
|
+
}
|
|
32730
|
+
const record = point;
|
|
32731
|
+
return ((this.readFiniteSensitivityNumber(record['p10Outcome'] ?? record['p10ConditionalOutcome']) !== null
|
|
32732
|
+
&& this.readFiniteSensitivityNumber(record['p90Outcome'] ?? record['p90ConditionalOutcome']) !== null)
|
|
32733
|
+
|| this.readFiniteSensitivityNumber(record['rankCorrelation'] ?? record['spearmanCorrelation']) !== null);
|
|
32734
|
+
}));
|
|
32735
|
+
}
|
|
32664
32736
|
resolveSemanticToneHex(tone, explicitColor, fallbackColor) {
|
|
32665
32737
|
const cleanExplicit = explicitColor?.trim();
|
|
32666
32738
|
if (cleanExplicit) {
|
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.70",
|
|
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.70",
|
|
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.70",
|
|
12
12
|
"rxjs": "~7.8.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
@@ -23,6 +23,7 @@ interface PraxisChartAxisConfig {
|
|
|
23
23
|
label?: string;
|
|
24
24
|
type?: PraxisChartAxisType;
|
|
25
25
|
position?: PraxisChartAxisPosition;
|
|
26
|
+
inverse?: boolean;
|
|
26
27
|
min?: number;
|
|
27
28
|
max?: number;
|
|
28
29
|
labels?: PraxisChartAxisLabelConfig;
|
|
@@ -697,6 +698,8 @@ interface PraxisXUiChartDimension {
|
|
|
697
698
|
format?: string;
|
|
698
699
|
extraction?: PraxisXUiChartDimensionExtraction;
|
|
699
700
|
alias?: string;
|
|
701
|
+
/** Reverses axis category order (useful for top-down horizontal tornado charts). */
|
|
702
|
+
inverse?: boolean;
|
|
700
703
|
}
|
|
701
704
|
interface PraxisXUiChartMetric {
|
|
702
705
|
field: string;
|
|
@@ -708,6 +711,8 @@ interface PraxisXUiChartMetric {
|
|
|
708
711
|
axis?: 'primary' | 'secondary';
|
|
709
712
|
color?: string;
|
|
710
713
|
format?: string;
|
|
714
|
+
/** Controls curve smoothing for line/area series. Forced to `false` when `confidenceBands` or `step` are active. */
|
|
715
|
+
smooth?: boolean;
|
|
711
716
|
/** Visual line stroke style for line, area, or combo line/area metrics. Defaults to `'solid'`. */
|
|
712
717
|
lineStyle?: PraxisChartLineStyle;
|
|
713
718
|
/** Step interpolation mode for discrete curves (incompatible with `smooth: true`). Defaults to `false`. */
|
|
@@ -860,6 +865,8 @@ interface PraxisXUiChartContract {
|
|
|
860
865
|
preset?: PraxisXUiChartPreset;
|
|
861
866
|
chartId?: string;
|
|
862
867
|
orientation?: 'vertical' | 'horizontal';
|
|
868
|
+
/** Reverses horizontal category Y-axis ordering so rank-0 items render at the top. */
|
|
869
|
+
yAxisInverse?: boolean;
|
|
863
870
|
title?: PraxisXUiChartTextValue;
|
|
864
871
|
subtitle?: PraxisXUiChartTextValue;
|
|
865
872
|
sizing?: PraxisXUiChartSizing;
|
|
@@ -1001,6 +1008,8 @@ interface PraxisChartConfig {
|
|
|
1001
1008
|
id?: string;
|
|
1002
1009
|
type: PraxisChartType;
|
|
1003
1010
|
orientation?: 'vertical' | 'horizontal';
|
|
1011
|
+
/** Reverses horizontal category Y-axis ordering so rank-0 items render at the top. */
|
|
1012
|
+
yAxisInverse?: boolean;
|
|
1004
1013
|
title?: PraxisTextValue;
|
|
1005
1014
|
subtitle?: PraxisTextValue;
|
|
1006
1015
|
sizing?: PraxisChartSizingConfig;
|