@praxisui/charts 1.0.0-beta.68 → 3.0.0-beta.1
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/fesm2022/praxisui-charts.mjs +669 -55
- package/fesm2022/praxisui-charts.mjs.map +1 -1
- package/index.d.ts +36 -10
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -39,11 +39,13 @@ type PraxisChartStatsMetricOperation = 'COUNT' | 'SUM' | 'AVG' | 'MIN' | 'MAX';
|
|
|
39
39
|
interface PraxisChartStatsMetricRequest {
|
|
40
40
|
operation: PraxisChartStatsMetricOperation;
|
|
41
41
|
field?: string;
|
|
42
|
+
alias?: string;
|
|
42
43
|
}
|
|
43
44
|
interface PraxisChartGroupByStatsRequest {
|
|
44
45
|
filter: Record<string, unknown>;
|
|
45
46
|
field: string;
|
|
46
47
|
metric: PraxisChartStatsMetricRequest;
|
|
48
|
+
metrics?: PraxisChartStatsMetricRequest[];
|
|
47
49
|
limit?: number;
|
|
48
50
|
orderBy?: 'KEY_ASC' | 'KEY_DESC' | 'VALUE_ASC' | 'VALUE_DESC';
|
|
49
51
|
}
|
|
@@ -52,6 +54,7 @@ interface PraxisChartTimeSeriesStatsRequest {
|
|
|
52
54
|
field: string;
|
|
53
55
|
granularity: Uppercase<PraxisChartStatsGranularity>;
|
|
54
56
|
metric: PraxisChartStatsMetricRequest;
|
|
57
|
+
metrics?: PraxisChartStatsMetricRequest[];
|
|
55
58
|
from?: string;
|
|
56
59
|
to?: string;
|
|
57
60
|
fillGaps?: boolean;
|
|
@@ -118,7 +121,7 @@ interface PraxisChartQueryRequestEvent {
|
|
|
118
121
|
query?: PraxisChartQueryConfig;
|
|
119
122
|
}
|
|
120
123
|
|
|
121
|
-
type PraxisChartType = 'bar' | 'line' | 'pie' | 'donut' | 'area' | 'stacked-bar';
|
|
124
|
+
type PraxisChartType = 'bar' | 'combo' | 'horizontal-bar' | 'line' | 'pie' | 'donut' | 'area' | 'stacked-bar' | 'stacked-area' | 'scatter';
|
|
122
125
|
type PraxisChartAggregation = 'sum' | 'count' | 'avg' | 'min' | 'max';
|
|
123
126
|
interface PraxisChartMetricConfig {
|
|
124
127
|
field?: string;
|
|
@@ -133,6 +136,7 @@ interface PraxisChartSeriesConfig {
|
|
|
133
136
|
id: string;
|
|
134
137
|
name?: string;
|
|
135
138
|
type?: PraxisChartType;
|
|
139
|
+
axis?: 'primary' | 'secondary';
|
|
136
140
|
categoryField?: string;
|
|
137
141
|
metric?: PraxisChartMetricConfig;
|
|
138
142
|
color?: string;
|
|
@@ -176,12 +180,14 @@ interface PraxisChartStateConfig {
|
|
|
176
180
|
interface PraxisChartConfig {
|
|
177
181
|
id?: string;
|
|
178
182
|
type: PraxisChartType;
|
|
183
|
+
orientation?: 'vertical' | 'horizontal';
|
|
179
184
|
title?: PraxisTextValue;
|
|
180
185
|
subtitle?: PraxisTextValue;
|
|
181
186
|
height?: number | string;
|
|
182
187
|
axes?: {
|
|
183
188
|
x?: PraxisChartAxisConfig;
|
|
184
189
|
y?: PraxisChartAxisConfig;
|
|
190
|
+
ySecondary?: PraxisChartAxisConfig;
|
|
185
191
|
};
|
|
186
192
|
series: PraxisChartSeriesConfig[];
|
|
187
193
|
dataSource?: PraxisChartDataSource;
|
|
@@ -276,7 +282,7 @@ declare class PraxisChartStateProbeComponent {
|
|
|
276
282
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PraxisChartStateProbeComponent, "praxis-chart-state-probe", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
277
283
|
}
|
|
278
284
|
|
|
279
|
-
type PraxisXUiChartKind = 'bar' | 'line' | 'pie' | 'donut' | 'area' | 'stacked-bar';
|
|
285
|
+
type PraxisXUiChartKind = 'bar' | 'combo' | 'horizontal-bar' | 'line' | 'pie' | 'donut' | 'area' | 'stacked-bar' | 'stacked-area' | 'scatter';
|
|
280
286
|
type PraxisXUiChartPreset = 'kpi-trend' | 'comparison' | 'distribution' | 'ranking' | 'composition' | 'hierarchical-drill-down';
|
|
281
287
|
type PraxisXUiChartTextValue = string | {
|
|
282
288
|
key: string;
|
|
@@ -300,13 +306,16 @@ interface PraxisXUiChartSort {
|
|
|
300
306
|
interface PraxisXUiChartDimension {
|
|
301
307
|
field: string;
|
|
302
308
|
label?: PraxisXUiChartTextValue;
|
|
303
|
-
role?: 'category' | 'series' | 'segment' | 'time';
|
|
309
|
+
role?: 'category' | 'series' | 'segment' | 'time' | 'value';
|
|
304
310
|
format?: string;
|
|
305
311
|
}
|
|
306
312
|
interface PraxisXUiChartMetric {
|
|
307
313
|
field: string;
|
|
308
314
|
label?: PraxisXUiChartTextValue;
|
|
309
315
|
aggregation?: PraxisXUiChartAggregation;
|
|
316
|
+
seriesKind?: 'bar' | 'line' | 'area';
|
|
317
|
+
axis?: 'primary' | 'secondary';
|
|
318
|
+
color?: string;
|
|
310
319
|
format?: string;
|
|
311
320
|
}
|
|
312
321
|
interface PraxisXUiChartAggregationConfig {
|
|
@@ -368,6 +377,7 @@ interface PraxisXUiChartContract {
|
|
|
368
377
|
kind: PraxisXUiChartKind;
|
|
369
378
|
preset?: PraxisXUiChartPreset;
|
|
370
379
|
chartId?: string;
|
|
380
|
+
orientation?: 'vertical' | 'horizontal';
|
|
371
381
|
title?: PraxisXUiChartTextValue;
|
|
372
382
|
subtitle?: PraxisXUiChartTextValue;
|
|
373
383
|
height?: number | string;
|
|
@@ -465,6 +475,9 @@ declare class PraxisChartCanonicalContractMapperService {
|
|
|
465
475
|
private buildQuery;
|
|
466
476
|
private buildInteractions;
|
|
467
477
|
private buildTheme;
|
|
478
|
+
private resolveOrientation;
|
|
479
|
+
private resolveSeriesType;
|
|
480
|
+
private shouldSmoothSeries;
|
|
468
481
|
private mapTextValue;
|
|
469
482
|
private toLabel;
|
|
470
483
|
private resolveToggle;
|
|
@@ -474,6 +487,7 @@ declare class PraxisChartCanonicalContractMapperService {
|
|
|
474
487
|
private buildStatsRequest;
|
|
475
488
|
private resolveStatsField;
|
|
476
489
|
private buildStatsMetricRequest;
|
|
490
|
+
private buildStatsMetricRequests;
|
|
477
491
|
private mapStatsOrderBy;
|
|
478
492
|
private mapStatsOrderByToBackend;
|
|
479
493
|
private mapStatsGranularityToBackend;
|
|
@@ -486,13 +500,14 @@ declare class PraxisChartCanonicalContractMapperService {
|
|
|
486
500
|
interface PraxisChartCartesianSeries {
|
|
487
501
|
id: string;
|
|
488
502
|
name: string;
|
|
489
|
-
type: 'bar' | 'line';
|
|
503
|
+
type: 'bar' | 'line' | 'scatter';
|
|
504
|
+
axis?: 'primary' | 'secondary';
|
|
490
505
|
stack?: string;
|
|
491
506
|
smooth?: boolean;
|
|
492
507
|
area?: boolean;
|
|
493
508
|
color?: string;
|
|
494
509
|
labelsVisible?: boolean;
|
|
495
|
-
points: Array<number | null>;
|
|
510
|
+
points: Array<number | null | [number | string, number | null]>;
|
|
496
511
|
}
|
|
497
512
|
interface PraxisChartPieSlice {
|
|
498
513
|
id: string;
|
|
@@ -501,7 +516,7 @@ interface PraxisChartPieSlice {
|
|
|
501
516
|
color?: string;
|
|
502
517
|
}
|
|
503
518
|
interface PraxisChartTransformedData {
|
|
504
|
-
mode: 'cartesian' | 'pie';
|
|
519
|
+
mode: 'cartesian' | 'pie' | 'scatter';
|
|
505
520
|
categories: string[];
|
|
506
521
|
series: PraxisChartCartesianSeries[];
|
|
507
522
|
slices: PraxisChartPieSlice[];
|
|
@@ -512,9 +527,13 @@ declare class PraxisChartDataTransformerService {
|
|
|
512
527
|
private transformCartesian;
|
|
513
528
|
private transformPie;
|
|
514
529
|
private buildCartesianSeries;
|
|
530
|
+
private resolveCartesianSeriesType;
|
|
531
|
+
private isAreaLikeSeries;
|
|
532
|
+
private transformScatter;
|
|
515
533
|
private aggregate;
|
|
516
534
|
private extractMetricValue;
|
|
517
535
|
private normalizeCategory;
|
|
536
|
+
private extractScatterXValue;
|
|
518
537
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisChartDataTransformerService, never>;
|
|
519
538
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PraxisChartDataTransformerService>;
|
|
520
539
|
}
|
|
@@ -524,6 +543,8 @@ declare class PraxisChartOptionBuilderService {
|
|
|
524
543
|
constructor(transformer: PraxisChartDataTransformerService);
|
|
525
544
|
build(config: PraxisChartConfig, rows: PraxisChartDataRow[]): EChartsCoreOption;
|
|
526
545
|
private resolveText;
|
|
546
|
+
private buildGrid;
|
|
547
|
+
private buildCartesianYAxis;
|
|
527
548
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisChartOptionBuilderService, never>;
|
|
528
549
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PraxisChartOptionBuilderService>;
|
|
529
550
|
}
|
|
@@ -582,7 +603,8 @@ declare class PraxisChartStatsApiService {
|
|
|
582
603
|
private resolveBucketCategory;
|
|
583
604
|
private resolveMetricValue;
|
|
584
605
|
private resolveCategoryField;
|
|
585
|
-
private
|
|
606
|
+
private resolveMetricBindings;
|
|
607
|
+
private projectMetricValues;
|
|
586
608
|
private buildStatsUrl;
|
|
587
609
|
private buildDefaultApiBase;
|
|
588
610
|
private normalizePath;
|
|
@@ -596,6 +618,10 @@ declare class PraxisChartStatsApiService {
|
|
|
596
618
|
declare const PRAXIS_CHART_BACKEND_MOCK_BAR: PraxisChartBackendPayload;
|
|
597
619
|
declare const PRAXIS_CHART_BACKEND_MOCK_TIMESERIES: PraxisChartBackendPayload;
|
|
598
620
|
declare const PRAXIS_CHART_BACKEND_MOCK_DONUT: PraxisChartBackendPayload;
|
|
621
|
+
declare const PRAXIS_CHART_BACKEND_MOCK_HORIZONTAL_BAR: PraxisChartBackendPayload;
|
|
622
|
+
declare const PRAXIS_CHART_BACKEND_MOCK_STACKED_AREA: PraxisChartBackendPayload;
|
|
623
|
+
declare const PRAXIS_CHART_BACKEND_MOCK_SCATTER: PraxisChartBackendPayload;
|
|
624
|
+
declare const PRAXIS_CHART_BACKEND_MOCK_COMBO: PraxisChartBackendPayload;
|
|
599
625
|
|
|
600
626
|
declare const PRAXIS_CHART_DRILLDOWN_DATA_BY_MONTH: Record<string, PraxisChartDataRow[]>;
|
|
601
627
|
|
|
@@ -605,7 +631,7 @@ declare function buildPraxisChartInteractiveWidgetPage(adapter: PraxisChartBacke
|
|
|
605
631
|
declare function buildPraxisChartInteractiveGridPage(adapter: PraxisChartBackendPayloadAdapterService): GridPageDefinition;
|
|
606
632
|
|
|
607
633
|
type ShowcaseLayoutMode = 'widget' | 'grid';
|
|
608
|
-
type ShowcasePayloadMode = 'group-by' | 'timeseries' | 'distribution';
|
|
634
|
+
type ShowcasePayloadMode = 'group-by' | 'timeseries' | 'distribution' | 'horizontal-bar' | 'stacked-area' | 'scatter' | 'combo';
|
|
609
635
|
type ShowcaseScenarioMode = 'baseline' | 'interactive' | 'empty' | 'loading' | 'error';
|
|
610
636
|
declare class PraxisChartCompositionShowcaseComponent {
|
|
611
637
|
protected readonly layoutMode: _angular_core.WritableSignal<ShowcaseLayoutMode>;
|
|
@@ -619,7 +645,7 @@ declare class PraxisChartCompositionShowcaseComponent {
|
|
|
619
645
|
private readonly backendPayloadAdapter;
|
|
620
646
|
protected readonly widgetPage: _angular_core.Signal<_praxisui_core.WidgetPageDefinition>;
|
|
621
647
|
protected readonly gridPage: _angular_core.Signal<_praxisui_core.GridPageDefinition>;
|
|
622
|
-
protected readonly payloadTitle: _angular_core.Signal<"Envelope timeseries" | "Envelope distribution" | "Envelope group-by">;
|
|
648
|
+
protected readonly payloadTitle: _angular_core.Signal<"Envelope timeseries" | "Envelope distribution" | "Envelope horizontal-bar" | "Envelope stacked-area" | "Envelope scatter" | "Envelope combo" | "Envelope group-by">;
|
|
623
649
|
protected readonly selectedPayloadJson: _angular_core.Signal<string>;
|
|
624
650
|
private readonly selectedPayload;
|
|
625
651
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisChartCompositionShowcaseComponent, never>;
|
|
@@ -635,5 +661,5 @@ declare function providePraxisChartDrilldownPanelMetadata(): Provider;
|
|
|
635
661
|
declare const PRAXIS_CHART_STATE_PROBE_COMPONENT_METADATA: ComponentDocMeta;
|
|
636
662
|
declare function providePraxisChartStateProbeMetadata(): Provider;
|
|
637
663
|
|
|
638
|
-
export { PRAXIS_CHART_BACKEND_MOCK_BAR, PRAXIS_CHART_BACKEND_MOCK_DONUT, PRAXIS_CHART_BACKEND_MOCK_TIMESERIES, PRAXIS_CHART_COMPONENT_METADATA, PRAXIS_CHART_DRILLDOWN_DATA_BY_MONTH, PRAXIS_CHART_DRILLDOWN_PANEL_METADATA, PRAXIS_CHART_ENGINE, PRAXIS_CHART_STATE_PROBE_COMPONENT_METADATA, PraxisChartBackendPayloadAdapterService, PraxisChartCanonicalContractMapperService, PraxisChartComponent, PraxisChartCompositionShowcaseComponent, PraxisChartDataTransformerService, PraxisChartDrilldownPanelComponent, PraxisChartOptionBuilderService, PraxisChartSchemaMapperService, PraxisChartStateProbeComponent, PraxisChartStatsApiService, buildPraxisChartInteractiveGridPage, buildPraxisChartInteractiveWidgetPage, buildPraxisChartMockGridPage, buildPraxisChartMockWidgetPage, providePraxisChartDrilldownPanelMetadata, providePraxisChartStateProbeMetadata, providePraxisCharts, providePraxisChartsMetadata };
|
|
664
|
+
export { PRAXIS_CHART_BACKEND_MOCK_BAR, PRAXIS_CHART_BACKEND_MOCK_COMBO, PRAXIS_CHART_BACKEND_MOCK_DONUT, PRAXIS_CHART_BACKEND_MOCK_HORIZONTAL_BAR, PRAXIS_CHART_BACKEND_MOCK_SCATTER, PRAXIS_CHART_BACKEND_MOCK_STACKED_AREA, PRAXIS_CHART_BACKEND_MOCK_TIMESERIES, PRAXIS_CHART_COMPONENT_METADATA, PRAXIS_CHART_DRILLDOWN_DATA_BY_MONTH, PRAXIS_CHART_DRILLDOWN_PANEL_METADATA, PRAXIS_CHART_ENGINE, PRAXIS_CHART_STATE_PROBE_COMPONENT_METADATA, PraxisChartBackendPayloadAdapterService, PraxisChartCanonicalContractMapperService, PraxisChartComponent, PraxisChartCompositionShowcaseComponent, PraxisChartDataTransformerService, PraxisChartDrilldownPanelComponent, PraxisChartOptionBuilderService, PraxisChartSchemaMapperService, PraxisChartStateProbeComponent, PraxisChartStatsApiService, buildPraxisChartInteractiveGridPage, buildPraxisChartInteractiveWidgetPage, buildPraxisChartMockGridPage, buildPraxisChartMockWidgetPage, providePraxisChartDrilldownPanelMetadata, providePraxisChartStateProbeMetadata, providePraxisCharts, providePraxisChartsMetadata };
|
|
639
665
|
export type { PraxisChartAggregation, PraxisChartAxisConfig, PraxisChartAxisLabelConfig, PraxisChartAxisPosition, PraxisChartAxisType, PraxisChartBackendPayload, PraxisChartBackendWidgetPayload, PraxisChartCartesianSeries, PraxisChartConfig, PraxisChartDataRow, PraxisChartDataSource, PraxisChartDistributionStatsRequest, PraxisChartEmptyStateConfig, PraxisChartEngineAdapter, PraxisChartEngineRenderPayload, PraxisChartErrorStateConfig, PraxisChartGridWidgetInstance, PraxisChartGroupByStatsRequest, PraxisChartInteractionConfig, PraxisChartLegendConfig, PraxisChartLoadState, PraxisChartLocalDataSource, PraxisChartMetricConfig, PraxisChartPieSlice, PraxisChartPointEvent, PraxisChartPrimitive, PraxisChartQueryConfig, PraxisChartQueryMetricConfig, PraxisChartQueryRequestEvent, PraxisChartRemoteDataSource, PraxisChartSchemaMeta, PraxisChartSeriesConfig, PraxisChartSeriesLabelConfig, PraxisChartStateConfig, PraxisChartStatsDistributionMode, PraxisChartStatsGranularity, PraxisChartStatsMetricOperation, PraxisChartStatsMetricRequest, PraxisChartStatsOperation, PraxisChartStatsOrderBy, PraxisChartStatsRequest, PraxisChartThemeConfig, PraxisChartTimeSeriesStatsRequest, PraxisChartTooltipConfig, PraxisChartTransformedData, PraxisChartType, PraxisChartWidgetInstance, PraxisChartWidgetLike, PraxisChartWidgetResolution, PraxisChartWidgetSchema, PraxisXUiChartAggregation, PraxisXUiChartAggregationConfig, PraxisXUiChartContract, PraxisXUiChartDimension, PraxisXUiChartEventAction, PraxisXUiChartEvents, PraxisXUiChartFilter, PraxisXUiChartKind, PraxisXUiChartMetric, PraxisXUiChartPreset, PraxisXUiChartRefresh, PraxisXUiChartRuntimeHints, PraxisXUiChartSort, PraxisXUiChartSource, PraxisXUiChartSourceKind, PraxisXUiChartState, PraxisXUiChartStateDescriptor, PraxisXUiChartStatsDistributionMode, PraxisXUiChartStatsOperation, PraxisXUiChartStatsOrderBy, PraxisXUiChartStatsSourceOptions, PraxisXUiChartTextValue, PraxisXUiChartTheme, PraxisXUiChartToggleableFeature };
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/charts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.1",
|
|
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": "^20.0.0",
|
|
7
7
|
"@angular/core": "^20.0.0",
|
|
8
|
-
"@praxisui/core": "^
|
|
8
|
+
"@praxisui/core": "^3.0.0-beta.1"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"echarts": "^6.0.0",
|