@bino-bi/bn-template-engine 1.0.0-alpha.3 → 1.0.0-alpha.4
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/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
- package/dist/bn-template-engine/p-1265d8d3.entry.js +1 -0
- package/dist/bn-template-engine/p-15516dac.entry.js +1 -0
- package/dist/bn-template-engine/p-1c716641.entry.js +1 -0
- package/dist/bn-template-engine/p-27cc8dc0.entry.js +1 -0
- package/dist/bn-template-engine/p-4426d484.entry.js +1 -0
- package/dist/bn-template-engine/p-51f8dc9e.entry.js +1 -0
- package/dist/bn-template-engine/p-53d4e690.entry.js +1 -0
- package/dist/bn-template-engine/p-5KQYRQLK.js +1 -0
- package/dist/bn-template-engine/p-745f4596.entry.js +1 -0
- package/dist/bn-template-engine/{p-0f1504f3.entry.js → p-75e97c87.entry.js} +1 -1
- package/dist/bn-template-engine/p-7a560278.entry.js +1 -0
- package/dist/bn-template-engine/p-7ea7c325.entry.js +1 -0
- package/dist/bn-template-engine/p-945cc95d.entry.js +1 -0
- package/dist/bn-template-engine/p-BYBpC0EO.js +1 -0
- package/dist/bn-template-engine/p-BfXY5dsy.js +1 -0
- package/dist/bn-template-engine/p-BgnHJQ9Q.js +1 -0
- package/dist/bn-template-engine/{p-B4ySv9KQ.js → p-Bhd_WSML.js} +1 -1
- package/dist/bn-template-engine/p-Bka-Z6jo.js +1 -0
- package/dist/bn-template-engine/p-Bnhh02CF.js +1 -0
- package/dist/bn-template-engine/p-C7dQL8CS.js +1 -0
- package/dist/bn-template-engine/p-CL1RYuNU.js +1 -0
- package/dist/bn-template-engine/p-CYwd_ZNM.js +1 -0
- package/dist/bn-template-engine/p-ChlK-T9I.js +1 -0
- package/dist/bn-template-engine/p-DHezf8pZ.js +1 -0
- package/dist/bn-template-engine/{p-DVMu6dEy.js → p-DlppAFq9.js} +1 -1
- package/dist/bn-template-engine/p-DvDDgmcV.js +1 -0
- package/dist/bn-template-engine/p-DvvwfRQG.js +1 -0
- package/dist/bn-template-engine/{p-DG-1MR_T.js → p-P7pGJBgc.js} +1 -1
- package/dist/bn-template-engine/p-b34eaf86.entry.js +1 -0
- package/dist/bn-template-engine/p-bdb8b44c.entry.js +1 -0
- package/dist/bn-template-engine/p-c44fcb8e.entry.js +1 -0
- package/dist/bn-template-engine/p-c7e1a49b.entry.js +1 -0
- package/dist/bn-template-engine/p-d9003041.entry.js +1 -0
- package/dist/bn-template-engine/p-daa7ffa3.entry.js +1 -0
- package/dist/bn-template-engine/p-e084f50a.entry.js +1 -0
- package/dist/bn-template-engine/p-eaba6658.entry.js +1 -0
- package/dist/bn-template-engine/{p-C0yAPzJz.js → p-u8igQLRZ.js} +1 -1
- package/dist/cjs/{DataFormatDigits-DAmZzqbD.js → DataFormatDigits-DKcOeLNK.js} +1 -1
- package/dist/cjs/{DateStringFactory-CcluhpGI.js → DateStringFactory-CSKvbS8K.js} +1 -1
- package/dist/cjs/{Order-BKoDS21t.js → Order-iG11HI4R.js} +8 -5
- package/dist/cjs/{SVGVariancesStyleGroup-DYYAU-81.js → SVGVariancesStyleGroup-K-Tw6lOD.js} +1 -14
- package/dist/cjs/bn-asset.cjs.entry.js +5 -4
- package/dist/cjs/bn-body_4.cjs.entry.js +15 -13
- package/dist/cjs/bn-card.cjs.entry.js +5 -4
- package/dist/cjs/{ibcs-chart-structure.cjs.entry.js → bn-chart-structure_5.cjs.entry.js} +1058 -28
- package/dist/cjs/bn-chart-time.cjs.entry.js +38 -12
- package/dist/cjs/bn-component-style.cjs.entry.js +5 -4
- package/dist/cjs/bn-dataset.cjs.entry.js +38 -9
- package/dist/cjs/bn-grid.cjs.entry.js +9 -7
- package/dist/cjs/bn-image.cjs.entry.js +9 -7
- package/dist/cjs/bn-internationalization.cjs.entry.js +5 -4
- package/dist/cjs/bn-layout-card.cjs.entry.js +3 -2
- package/dist/cjs/bn-layout-page.cjs.entry.js +2 -1
- package/dist/cjs/bn-message.cjs.entry.js +5 -4
- package/dist/cjs/bn-table.cjs.entry.js +979 -0
- package/dist/cjs/bn-template-engine.cjs.js +1 -1
- package/dist/cjs/bn-template.cjs.entry.js +3 -2
- package/dist/cjs/bn-text.cjs.entry.js +11 -9
- package/dist/cjs/bn-tree.cjs.entry.js +9 -7
- package/dist/cjs/contentDecoder-JxOldq1e.js +419 -0
- package/dist/cjs/{context-protocol-CRPmux5D.js → context-protocol-DRQWrwsA.js} +2 -0
- package/dist/cjs/editor-companion.cjs.entry.js +1 -1
- package/dist/cjs/emotion-hash.esm-nbbEQ0Dn.js +57 -0
- package/dist/cjs/ibcs-chart-time.cjs.entry.js +22 -18
- package/dist/cjs/{bn-context_5.cjs.entry.js → ibcs-table.cjs.entry.js} +122 -1293
- package/dist/cjs/{StringAdapter-Bneo8T4k.js → ibcsRuleSet-DgUoXOfd.js} +10 -10
- package/dist/cjs/index-Dm85hG6t.js +65 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{scaling-D8sIIKft.js → scaling-9Tz595RQ.js} +7 -7
- package/dist/cjs/{withHasError-B8gHkfV2.js → utils-CwHIVbbL.js} +1 -69
- package/dist/cjs/{withBodyObserver-C6gLgq_e.js → withBodyObserver-CKpSD8UT.js} +3 -3
- package/dist/cjs/{withComponentStatus-_x4LQZ0N.js → withComponentStatus-Bw70BhO0.js} +5 -5
- package/dist/cjs/{withComponentStyle-DMtic_9Y.js → withComponentStyle-aIbTCtfj.js} +5 -5
- package/dist/cjs/withHasError-D7ue5vAv.js +72 -0
- package/dist/cjs/{withStyled-CW30Bh6c.js → withStyled-CS1Yp4sv.js} +8 -61
- package/dist/cjs/{withTranslation-CWPAIRjh.js → withTranslation-rwgyITqe.js} +5 -5
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +226 -99
- package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +13 -3
- package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +94 -11
- package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +3 -4
- package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +4 -0
- package/dist/collection/components/bn-chart-time/bn-chart-time.js +28 -4
- package/dist/collection/components/bn-chart-time/utils/TimeChart.js +3 -3
- package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -4
- package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +4 -0
- package/dist/collection/components/bn-dataset/bn-dataset.js +49 -2
- package/dist/collection/components/bn-datasource/bn-datasource.js +46 -3
- package/dist/collection/components/bn-table/bn-table.js +9 -12
- package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +58 -41
- package/dist/collection/stores/componentStyles.js +2 -0
- package/dist/collection/utils/constants.js +8 -5
- package/dist/collection/utils/contentDecoder.js +28 -0
- package/dist/collection/utils/stackColors.js +2 -2
- package/dist/collection/utils/validate.js +1 -1
- package/dist/components/DataFormatDigits.js +1 -1
- package/dist/components/Order.js +1 -1
- package/dist/components/SVGVariancesStyleGroup.js +1 -1
- package/dist/components/bn-chart-structure.js +1 -1
- package/dist/components/bn-chart-time.js +1 -1
- package/dist/components/bn-dataset.js +1 -1
- package/dist/components/bn-datasource.js +1 -1
- package/dist/components/bn-table.js +1 -1
- package/dist/components/contentDecoder.js +1 -0
- package/dist/components/context-protocol.js +1 -1
- package/dist/components/emotion-hash.esm.js +1 -0
- package/dist/components/ibcs-chart-structure2.js +1 -1
- package/dist/components/ibcs-chart-time2.js +1 -1
- package/dist/components/ibcs-table2.js +1 -1
- package/dist/components/ibcs-title2.js +1 -1
- package/dist/components/ibcsRuleSet.js +1 -1
- package/dist/components/validate.js +1 -1
- package/dist/components/withStyled.js +1 -1
- package/dist/esm/{DataFormatDigits--qIbKvXa.js → DataFormatDigits-oSZ1hBKE.js} +1 -1
- package/dist/esm/{DateStringFactory-XWdUjsn8.js → DateStringFactory-CSGz6TDk.js} +1 -1
- package/dist/esm/{Order-sqjrku2z.js → Order-Bnhh02CF.js} +9 -6
- package/dist/esm/{SVGVariancesStyleGroup-ibg3sLjM.js → SVGVariancesStyleGroup-CqTjrZYg.js} +2 -13
- package/dist/esm/bn-asset.entry.js +5 -4
- package/dist/esm/bn-body_4.entry.js +11 -9
- package/dist/esm/bn-card.entry.js +5 -4
- package/dist/esm/{ibcs-chart-structure.entry.js → bn-chart-structure_5.entry.js} +1048 -22
- package/dist/esm/bn-chart-time.entry.js +38 -12
- package/dist/esm/bn-component-style.entry.js +5 -4
- package/dist/esm/bn-dataset.entry.js +35 -6
- package/dist/esm/bn-grid.entry.js +9 -7
- package/dist/esm/bn-image.entry.js +9 -7
- package/dist/esm/bn-internationalization.entry.js +5 -4
- package/dist/esm/bn-layout-card.entry.js +3 -2
- package/dist/esm/bn-layout-page.entry.js +2 -1
- package/dist/esm/bn-message.entry.js +5 -4
- package/dist/esm/bn-table.entry.js +977 -0
- package/dist/esm/bn-template-engine.js +1 -1
- package/dist/esm/bn-template.entry.js +3 -2
- package/dist/esm/bn-text.entry.js +11 -9
- package/dist/esm/bn-tree.entry.js +9 -7
- package/dist/esm/contentDecoder-oMmxz6nJ.js +416 -0
- package/dist/esm/{context-protocol-Bz5klD-F.js → context-protocol-BHnQsVsr.js} +2 -0
- package/dist/esm/editor-companion.entry.js +1 -1
- package/dist/esm/emotion-hash.esm-BYBpC0EO.js +55 -0
- package/dist/esm/ibcs-chart-time.entry.js +15 -11
- package/dist/esm/{bn-context_5.entry.js → ibcs-table.entry.js} +68 -1235
- package/dist/esm/{StringAdapter-BCLJpQQ8.js → ibcsRuleSet-K4ytuA1f.js} +10 -10
- package/dist/esm/index-DHezf8pZ.js +65 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{scaling-C6K8FYSF.js → scaling-Cehc74IE.js} +2 -2
- package/dist/esm/{withHasError-B3QX2emi.js → utils-DvvwfRQG.js} +1 -69
- package/dist/esm/{withBodyObserver-DczL5ia8.js → withBodyObserver-FQ8NwCIz.js} +1 -1
- package/dist/esm/{withComponentStatus-DodoSXe-.js → withComponentStatus-DWjDYtZ7.js} +1 -1
- package/dist/esm/{withComponentStyle-BerJY64r.js → withComponentStyle-9uP_hcDq.js} +2 -2
- package/dist/esm/withHasError-FyY5mQ_3.js +70 -0
- package/dist/esm/{withStyled-D1fAWJ3g.js → withStyled--qQWquTH.js} +6 -59
- package/dist/esm/{withTranslation-mimbJdER.js → withTranslation-BqD0Kp7b.js} +2 -2
- package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +155 -109
- package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
- package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +1 -0
- package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +1 -0
- package/dist/types/components/bn-dataset/bn-dataset.d.ts +6 -0
- package/dist/types/components/bn-datasource/bn-datasource.d.ts +8 -0
- package/dist/types/components/bn-table/bn-table.d.ts +3 -3
- package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +0 -2
- package/dist/types/components.d.ts +100 -36
- package/dist/types/stores/componentStyles.d.ts +2 -0
- package/dist/types/utils/constants.d.ts +8 -5
- package/dist/types/utils/contentDecoder.d.ts +12 -0
- package/package.json +2 -1
- package/dist/bn-template-engine/p-05a82a77.entry.js +0 -1
- package/dist/bn-template-engine/p-1970906d.entry.js +0 -1
- package/dist/bn-template-engine/p-1dbd339c.entry.js +0 -1
- package/dist/bn-template-engine/p-2e68cf09.entry.js +0 -1
- package/dist/bn-template-engine/p-31cc6a2d.entry.js +0 -1
- package/dist/bn-template-engine/p-37881d05.entry.js +0 -1
- package/dist/bn-template-engine/p-3b894997.entry.js +0 -1
- package/dist/bn-template-engine/p-50e49732.entry.js +0 -1
- package/dist/bn-template-engine/p-6c7c0455.entry.js +0 -1
- package/dist/bn-template-engine/p-6da93eae.entry.js +0 -1
- package/dist/bn-template-engine/p-701e1578.entry.js +0 -1
- package/dist/bn-template-engine/p-8tsCnxIz.js +0 -1
- package/dist/bn-template-engine/p-997b2fe4.entry.js +0 -1
- package/dist/bn-template-engine/p-BL8gyUwE.js +0 -1
- package/dist/bn-template-engine/p-BSfqOkN_.js +0 -1
- package/dist/bn-template-engine/p-CRLgp9-v.js +0 -1
- package/dist/bn-template-engine/p-CYjZRKdI.js +0 -1
- package/dist/bn-template-engine/p-DRikHQE-.js +0 -1
- package/dist/bn-template-engine/p-DtdQCMzj.js +0 -1
- package/dist/bn-template-engine/p-a90f1cbe.entry.js +0 -1
- package/dist/bn-template-engine/p-b7bec050.entry.js +0 -1
- package/dist/bn-template-engine/p-d7f0cbaf.entry.js +0 -1
- package/dist/bn-template-engine/p-dfb61aa5.entry.js +0 -1
- package/dist/bn-template-engine/p-ece17f84.entry.js +0 -1
- package/dist/bn-template-engine/p-f27995c9.entry.js +0 -1
- package/dist/bn-template-engine/p-fd427179.entry.js +0 -1
- package/dist/bn-template-engine/p-sqjrku2z.js +0 -1
- package/dist/bn-template-engine/p-tzFCK9qn.js +0 -1
- package/dist/cjs/bn-chart-structure.cjs.entry.js +0 -700
- package/dist/esm/bn-chart-structure.entry.js +0 -698
|
@@ -19,174 +19,215 @@ export declare class Chart {
|
|
|
19
19
|
private readonly componentStyle;
|
|
20
20
|
private readonly errors;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Title displayed above the chart. When empty, the title is derived
|
|
23
|
+
* from the variance scenario labels (if variances are configured).
|
|
24
|
+
*
|
|
25
|
+
* @example chart-title="Revenue by Category"
|
|
23
26
|
*/
|
|
24
27
|
chartTitle: string;
|
|
25
28
|
/**
|
|
26
29
|
* AlaSQL WHERE clause fragment injected into the data query to filter
|
|
27
|
-
* rows before rendering
|
|
30
|
+
* rows before rendering.
|
|
31
|
+
*
|
|
32
|
+
* @example filter="rowGroup = 'Revenue'"
|
|
28
33
|
*/
|
|
29
34
|
filter: string;
|
|
30
35
|
/**
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
*
|
|
34
|
-
*
|
|
36
|
+
* Comma-separated list of scenario columns to display as bars.
|
|
37
|
+
* Up to 4 scenarios are supported; additional values are ignored.
|
|
38
|
+
*
|
|
39
|
+
* Valid scenario names: `ac1`–`ac4`, `fc1`–`fc4`, `pp1`–`pp4`, `pl1`–`pl4`.
|
|
35
40
|
*
|
|
36
|
-
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
* When left blank, scenarios are detected from the dataset with a warning.
|
|
41
|
+
* | Value | Behavior |
|
|
42
|
+
* |---------------|-------------------------------------------------------------|
|
|
43
|
+
* | `"ac1,fc1"` | Show the listed scenarios |
|
|
44
|
+
* | `"auto"` | Auto-detect from dataset metadata (no warning) |
|
|
45
|
+
* | not set / `""` | Auto-detect from dataset metadata (emits `AUTO_scenarios` warning) |
|
|
42
46
|
*
|
|
47
|
+
* @example scenarios="ac1,pp1,pl1"
|
|
43
48
|
*/
|
|
44
49
|
scenarios: string;
|
|
45
50
|
validateScenario(newValue: string): void;
|
|
46
51
|
/**
|
|
47
|
-
*
|
|
48
|
-
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
|
|
60
|
-
* if empty variance charts are hidden
|
|
61
|
-
*<br /> <br />
|
|
62
|
-
* each variance creates a chart
|
|
63
|
-
*<br /> <br />
|
|
64
|
-
* pattern:<br /> ```d<scenarioB>_<scenarioA>_[pos/neg/neu]```
|
|
65
|
-
*
|
|
66
|
-
* example: <br />```'dpp1_ac1_neg,dfc1_ac1_neg'```
|
|
52
|
+
* Comma-separated list of variance definitions. Each variance adds
|
|
53
|
+
* a separate sub-chart next to the main bar chart.
|
|
54
|
+
*
|
|
55
|
+
* **Pattern:** `d<base>_<comparison>_<sentiment>` (absolute)
|
|
56
|
+
* or `dr<base>_<comparison>_<sentiment>` (relative / percentage).
|
|
57
|
+
*
|
|
58
|
+
* - `base` / `comparison`: scenario names that must also appear in `scenarios`.
|
|
59
|
+
* - `sentiment`: `pos` (positive is good), `neg` (negative is good), `neu` (neutral).
|
|
60
|
+
*
|
|
61
|
+
* When empty, no variance charts are shown.
|
|
62
|
+
*
|
|
63
|
+
* @example variances="dpp1_ac1_neg,dfc1_ac1_neg"
|
|
64
|
+
* @example variances="drac1_pl1_pos"
|
|
67
65
|
*/
|
|
68
66
|
variances: string;
|
|
69
67
|
validateVariances(newValue: string): void;
|
|
70
68
|
/**
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
69
|
+
* Controls horizontal bar scaling (pixels per data unit).
|
|
70
|
+
*
|
|
71
|
+
* | Value | Behavior |
|
|
72
|
+
* |----------------|-----------------------------------------------------------------|
|
|
73
|
+
* | `"auto"` | Auto-fit bars to fill the available container width (no warning) |
|
|
74
|
+
* | not set / `""` | Same as auto, but emits `AUTO_unitScaling` warning |
|
|
75
|
+
* | `"0.03"`, `1` | Explicit pixels-per-unit value; bars scale proportionally |
|
|
76
|
+
* | group name | References a shared scaling group for synchronized charts |
|
|
77
|
+
*
|
|
78
|
+
* When using a custom value that causes the chart to exceed its container,
|
|
79
|
+
* a `WARN_overflow` error is emitted.
|
|
80
|
+
*
|
|
81
|
+
* @example unit-scaling="auto"
|
|
82
|
+
* @example unit-scaling="0.05"
|
|
76
83
|
*/
|
|
77
84
|
unitScaling: string | number;
|
|
78
85
|
validateUnitScaling(newValue: string | number): void;
|
|
79
86
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
87
|
+
* Controls scaling of relative variance bars (pixels per percentage point).
|
|
88
|
+
*
|
|
89
|
+
* | Value | Behavior |
|
|
90
|
+
* |----------------|---------------------------------------------------------------|
|
|
91
|
+
* | `"auto"` | Auto-fit to available width |
|
|
92
|
+
* | not set / `""` | Same as auto with warning |
|
|
93
|
+
* | `"50"`, `1.5` | Explicit pixels-per-percentage-point value |
|
|
94
|
+
* | group name | References a shared scaling group for synchronized charts |
|
|
95
|
+
*
|
|
96
|
+
* @example percentage-scaling="50"
|
|
85
97
|
*/
|
|
86
98
|
percentageScaling: string | number;
|
|
87
99
|
validatePercentageScaling(newValue: string | number): void;
|
|
88
100
|
/**
|
|
89
|
-
*
|
|
90
|
-
* <br /> <br />
|
|
101
|
+
* Aggregation level that determines which hierarchy dimension each bar represents.
|
|
91
102
|
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
103
|
+
* | Value | Bars represent |
|
|
104
|
+
* |--------------------|---------------------------|
|
|
105
|
+
* | `"rowGroup"` | Row groups |
|
|
106
|
+
* | `"rowGroupIndex"` | Row groups (dataset order)|
|
|
107
|
+
* | `"category"` | Categories |
|
|
108
|
+
* | `"categoryIndex"` | Categories (dataset order)|
|
|
109
|
+
* | `"subCategory"` | Sub-categories |
|
|
110
|
+
* | `"subCategoryIndex"` | Sub-categories (dataset order)|
|
|
111
|
+
* | `"auto"` | Auto-detect from dataset metadata (no warning) |
|
|
112
|
+
* | not set / `""` | Auto-detect with `AUTO_level` warning |
|
|
97
113
|
*
|
|
114
|
+
* Index variants preserve the original dataset order instead of sorting alphabetically.
|
|
115
|
+
* When `stack.by` is `"dimensions"`, the chart automatically stacks by the next-lower
|
|
116
|
+
* level (e.g. level `"rowGroup"` stacks by category).
|
|
117
|
+
*
|
|
118
|
+
* @example level="category"
|
|
98
119
|
*/
|
|
99
120
|
level: string;
|
|
100
121
|
validateLevel(newValue: string): void;
|
|
101
|
-
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
122
|
+
/**
|
|
123
|
+
* Comma-separated list of columns that define the sort order of bars.
|
|
124
|
+
* When ordering by a scenario column, that scenario must also be listed in `scenarios`.
|
|
125
|
+
*
|
|
126
|
+
* Valid values: `category`, `categoryIndex`, `rowGroup`, `rowGroupIndex`,
|
|
127
|
+
* `subCategory`, `subCategoryIndex`, `ac1`–`ac4`, `fc1`–`fc4`, `pp1`–`pp4`, `pl1`–`pl4`.
|
|
128
|
+
*
|
|
129
|
+
* | Value | Behavior |
|
|
130
|
+
* |----------------|-----------------------------------------------------|
|
|
131
|
+
* | `"ac1"` | Sort bars by the ac1 scenario values |
|
|
132
|
+
* | `"category"` | Sort bars alphabetically by category name |
|
|
133
|
+
* | `"auto"` | Auto-detect from dataset metadata (no warning) |
|
|
134
|
+
* | not set / `""` | Auto-detect with `AUTO_order` warning |
|
|
135
|
+
*
|
|
136
|
+
* @example order="ac1"
|
|
109
137
|
*/
|
|
110
138
|
order: string;
|
|
111
139
|
validateOrderList(newValue: string): void;
|
|
112
|
-
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
140
|
+
/**
|
|
141
|
+
* Sort direction applied to the columns specified in `order`.
|
|
142
|
+
*
|
|
143
|
+
* Values: `"asc"` (ascending) | `"desc"` (descending).
|
|
144
|
+
*
|
|
145
|
+
* @default "asc"
|
|
146
|
+
* @example order-direction="desc"
|
|
116
147
|
*/
|
|
117
148
|
orderDirection: string;
|
|
118
149
|
validateOrderDirection(newValue: string): void;
|
|
119
|
-
/** set translaton mode.
|
|
120
|
-
* <br /><br />
|
|
121
|
-
* values:<br />
|
|
122
|
-
* ``` all // none // meta ```
|
|
123
|
-
*/
|
|
124
150
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* <br /><br />
|
|
128
|
-
* rows wich where cut by the limit are cumulated as REST
|
|
151
|
+
* Maximum number of bars to display. Excess rows are aggregated into
|
|
152
|
+
* a "REST" summary bar. `0` means no limit (all rows are shown).
|
|
129
153
|
*
|
|
154
|
+
* @default 0
|
|
155
|
+
* @example limit="5"
|
|
130
156
|
*/
|
|
131
157
|
limit: number;
|
|
132
158
|
validateLimit(newValue: number): void;
|
|
159
|
+
/**
|
|
160
|
+
* Whether to display category labels on the left side of the chart.
|
|
161
|
+
*
|
|
162
|
+
* Values: `"true"` | `"false"`.
|
|
163
|
+
*
|
|
164
|
+
* @default "true"
|
|
165
|
+
* @example show-categories="false"
|
|
166
|
+
*/
|
|
133
167
|
showCategories: string;
|
|
134
168
|
validateShowCategories(newValue: string): void;
|
|
135
169
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* ``` "P": 1E+15,```<br />
|
|
147
|
-
* ``` "T": 1E+12,```<br />
|
|
148
|
-
* ``` "G": 1000000000,```<br />
|
|
149
|
-
* ``` "M": 1000000,```<br />
|
|
150
|
-
* ``` "k": 1000,```<br />
|
|
151
|
-
* <br />
|
|
152
|
-
* ``` "m": 0.001,```<br />
|
|
153
|
-
* ``` "μ": 0.000001,```<br />
|
|
154
|
-
* ``` "n": 0.000000001,```<br />
|
|
155
|
-
* ``` "p": 0.000000000001,```<br />
|
|
156
|
-
* ``` "f": 0.000000000000001,```<br />
|
|
157
|
-
* ``` "a": 0.000000000000000001,```<br />
|
|
158
|
-
* ``` "z": 0.000000000000000000001,```<br />
|
|
159
|
-
* ``` "y": 0.000000000000000000000001,```<br />
|
|
160
|
-
* <br /><br />
|
|
161
|
-
* Special modes:
|
|
162
|
-
* ```GREATEST``` seaches for the bigest (farest to zero) Value in the dataset and sets this value to SiPrefix<br />
|
|
163
|
-
* ```LEAST``` searches for smallest (closest to zero) Value in the dataset and sets this value to SiPrefix<br />
|
|
164
|
-
*<br /><br />
|
|
165
|
-
* ```_``` is the value for no SiPrefix the value is displayed as in the dataset stored.
|
|
170
|
+
* SI prefix applied to data values, dividing them for display
|
|
171
|
+
* (e.g. `"k"` divides by 1 000, showing 14 000 as "14").
|
|
172
|
+
*
|
|
173
|
+
* Common prefixes: `"k"` (×10³), `"M"` (×10⁶), `"G"` (×10⁹), `"T"` (×10¹²).
|
|
174
|
+
* Use `"_"` for no prefix (raw values).
|
|
175
|
+
*
|
|
176
|
+
* | Special value | Behavior |
|
|
177
|
+
* |---------------|--------------------------------------------------------------|
|
|
178
|
+
* | `"GREATEST"` | Auto-select prefix based on the largest value in the dataset |
|
|
179
|
+
* | `"LEAST"` | Auto-select prefix based on the smallest value |
|
|
166
180
|
*
|
|
181
|
+
* The selected prefix is shown in the chart footer when `show-measure-scale` is enabled.
|
|
167
182
|
*
|
|
183
|
+
* @default "greatest"
|
|
184
|
+
* @example measure-scale="k"
|
|
168
185
|
*/
|
|
169
186
|
measureScale: string;
|
|
170
187
|
validateMeasureScale(newValue: string): void;
|
|
171
188
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
189
|
+
* Toggles display of the SI prefix and unit label in the chart footer
|
|
190
|
+
* (e.g. "k EUR").
|
|
191
|
+
*
|
|
192
|
+
* Values: `"true"` | `"false"`.
|
|
193
|
+
*
|
|
194
|
+
* @default "false"
|
|
195
|
+
* @example show-measure-scale="true"
|
|
176
196
|
*/
|
|
177
197
|
showMeasureScale: string;
|
|
178
198
|
validateShowMeasureScale(newValue: string): void;
|
|
179
199
|
/**
|
|
180
|
-
*
|
|
200
|
+
* Unit label displayed alongside the SI prefix in the chart footer
|
|
201
|
+
* (e.g. "EUR", "USD", "pcs"). Only visible when `show-measure-scale` is `"true"`.
|
|
202
|
+
*
|
|
203
|
+
* @default ""
|
|
204
|
+
* @example measure-unit="EUR"
|
|
181
205
|
*/
|
|
182
206
|
measureUnit: string;
|
|
183
207
|
/**
|
|
184
|
-
* Stacking configuration
|
|
208
|
+
* Stacking configuration as a JSON string. When set, bars are drawn as
|
|
209
|
+
* stacked segments instead of side-by-side.
|
|
210
|
+
*
|
|
211
|
+
* **Properties:**
|
|
185
212
|
*
|
|
186
|
-
*
|
|
213
|
+
* | Key | Values | Description |
|
|
214
|
+
* |---------|-----------------------------------------------|----------------------------------------------------|
|
|
215
|
+
* | `by` | `"scenarios"` \| `"dimensions"` | **Required.** What to stack. |
|
|
216
|
+
* | `mode` | `"absolute"` \| `"relative"` \| `"absolute-relative"` | Stacking mode. Default: `"absolute"`. |
|
|
217
|
+
* | `order` | `"asc"` \| `"desc"` \| `"dataset"` | Segment sort order. Default: `"dataset"`. |
|
|
187
218
|
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
219
|
+
* - `by: "scenarios"` — stacks the scenarios listed in the `scenarios` prop end-to-end.
|
|
220
|
+
* - `by: "dimensions"` — stacks by the next-lower hierarchy level derived from `level`
|
|
221
|
+
* (e.g. level `"rowGroup"` stacks by category). Only the first scenario is used;
|
|
222
|
+
* extra scenarios trigger a `WARN_stack_dimensions_scenarios` warning.
|
|
223
|
+
* - `mode: "relative"` — normalizes each bar to 100%, showing proportions.
|
|
224
|
+
* - `mode: "absolute-relative"` — absolute bars with percentage labels.
|
|
225
|
+
*
|
|
226
|
+
* Segment colors are configurable via the `stackColors` array in component styles.
|
|
227
|
+
*
|
|
228
|
+
* @default "" (no stacking)
|
|
229
|
+
* @example stack='{"by":"scenarios","mode":"absolute"}'
|
|
230
|
+
* @example stack='{"by":"dimensions","mode":"relative"}'
|
|
190
231
|
*/
|
|
191
232
|
stack: string;
|
|
192
233
|
validateStack(newValue: string): void;
|
|
@@ -209,6 +250,11 @@ export declare class Chart {
|
|
|
209
250
|
componentWillLoad(): void;
|
|
210
251
|
private _autoScaleGuard;
|
|
211
252
|
componentDidRender(): void;
|
|
253
|
+
/**
|
|
254
|
+
* Emits an error when a custom unit-scaling value causes the chart to exceed its container width.
|
|
255
|
+
* Skipped for auto/unset unit-scaling since auto-fit handles width.
|
|
256
|
+
*/
|
|
257
|
+
private checkWidthOverflow;
|
|
212
258
|
prepareDimension(): ParentDimensions;
|
|
213
259
|
private prepareScenarios;
|
|
214
260
|
private prepareVariances;
|
|
@@ -50,6 +50,7 @@ export declare class StructureChart {
|
|
|
50
50
|
private dataFormatDigits;
|
|
51
51
|
private stackConfig;
|
|
52
52
|
private overflowConfig;
|
|
53
|
+
private highestStackedTotal;
|
|
53
54
|
constructor(ruleSet: VisualisationRuleSet, config: StructureChartComponentConfig, styles: StructureChartStyle);
|
|
54
55
|
private updatePosition;
|
|
55
56
|
private createElementPosition;
|
|
@@ -82,6 +83,11 @@ export declare class StructureChart {
|
|
|
82
83
|
* @param customColumnNameMap Custon ColumnNameMap can be used if data uses non standard columnames
|
|
83
84
|
*/
|
|
84
85
|
setData(data: StructureChartDataRow[], filter: string): void;
|
|
86
|
+
/**
|
|
87
|
+
* Returns the data value whose bar extent is proportional to pixelPerUnit.
|
|
88
|
+
* Used by autoFitScaling to separate fixed vs variable width components.
|
|
89
|
+
*/
|
|
90
|
+
getMaxBarValue(): number;
|
|
85
91
|
getAllocatedCanvasWidth(): number;
|
|
86
92
|
getAllocatedCanvasHeight(): number;
|
|
87
93
|
patternToString(): string;
|
|
@@ -101,6 +107,7 @@ export declare class StructureChart {
|
|
|
101
107
|
private calculateCategoryWidth;
|
|
102
108
|
private findSmallestDataPointValue;
|
|
103
109
|
private findHighestDataPointValue;
|
|
110
|
+
private findHighestStackedRowTotal;
|
|
104
111
|
private populateVarianceModel;
|
|
105
112
|
private calculateVariance;
|
|
106
113
|
private mapScenarios;
|
package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare class StructureChartStyle {
|
|
|
14
14
|
varianceStyles: SVGVariancesStyleGroup;
|
|
15
15
|
padding: Padding;
|
|
16
16
|
pattern: Map<string, SVGPolgonPattern>;
|
|
17
|
+
stackColors: string[];
|
|
17
18
|
constructor(scaleFactors: ScaleFactorsStructureChart, fontStyles: FontStyle, axisStyles: SVGStyleGroup, barStyles: SVGStyleGroup, varianceStyles: SVGVariancesStyleGroup, padding: Padding);
|
|
18
19
|
}
|
|
19
20
|
/** Adapts raw componentStyle JSON into a StructureChartStyle, falling back to defaults for missing properties. */
|
|
@@ -14,6 +14,7 @@ export declare class TimeChartStyle {
|
|
|
14
14
|
varianceStyles: SVGVariancesStyleGroup;
|
|
15
15
|
padding: Padding;
|
|
16
16
|
pattern: Map<string, SVGPolgonPattern>;
|
|
17
|
+
stackColors: string[];
|
|
17
18
|
constructor(scaleFactors: ScaleFactorsTimeChart, fontStyles: FontStyle, axisStyles: SVGStyleGroup, barStyles: SVGStyleGroup, varianceStyles: SVGVariancesStyleGroup, padding: Padding);
|
|
18
19
|
}
|
|
19
20
|
/** Adapts raw componentStyle JSON into a TimeChartStyle, falling back to defaults for missing properties. */
|
|
@@ -29,7 +29,13 @@ export declare class Dataset {
|
|
|
29
29
|
* content as raw JSON, writing it directly to the datasets store.
|
|
30
30
|
*/
|
|
31
31
|
static: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* When true (default), body content is plain text (SQL or JSON).
|
|
34
|
+
* When false, body content is a compressed payload (`<hash>:<base64_gzip>`).
|
|
35
|
+
*/
|
|
36
|
+
raw: boolean;
|
|
32
37
|
private query;
|
|
38
|
+
private lastBodyHash;
|
|
33
39
|
private database;
|
|
34
40
|
private latestResult;
|
|
35
41
|
executeQuery(): void;
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* Data is provided as JSON text inside the element body (observed via
|
|
5
5
|
* `withBodyObserver`). Other components (e.g. `bn-dataset`) reference
|
|
6
6
|
* the stored data by the `name` prop to run queries against it.
|
|
7
|
+
*
|
|
8
|
+
* Set `raw="false"` to accept pre-compressed payloads in `<hash>:<base64_gzip>` format.
|
|
7
9
|
*/
|
|
8
10
|
export declare class Datasource {
|
|
9
11
|
private element;
|
|
@@ -11,8 +13,14 @@ export declare class Datasource {
|
|
|
11
13
|
* Unique (template scope) name of the datasource
|
|
12
14
|
*/
|
|
13
15
|
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* When true (default), body content is plain JSON text.
|
|
18
|
+
* When false, body content is a compressed payload (`<hash>:<base64_gzip>`).
|
|
19
|
+
*/
|
|
20
|
+
raw: boolean;
|
|
14
21
|
private readonly errors;
|
|
15
22
|
private stores;
|
|
23
|
+
private lastHash;
|
|
16
24
|
constructor();
|
|
17
25
|
render(): any;
|
|
18
26
|
}
|
|
@@ -132,9 +132,9 @@ export declare class Table {
|
|
|
132
132
|
barColumnWidth: string;
|
|
133
133
|
validateBarColumnWidth(newValue: string): void;
|
|
134
134
|
/**
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
135
|
+
* Pixels per unit for absolute variance bar charts (ΔPY).
|
|
136
|
+
* Controls bar width: barWidth = value × unitScaling.
|
|
137
|
+
* Bars exceeding barColumnWidth are shown with an arrow indicator.
|
|
138
138
|
* <br /><br />
|
|
139
139
|
* Default: 0.01
|
|
140
140
|
*/
|
|
@@ -19,9 +19,7 @@ export interface CellBarChartStyles {
|
|
|
19
19
|
fontColor: string;
|
|
20
20
|
fontSize: number;
|
|
21
21
|
fontFamily: string;
|
|
22
|
-
/** @deprecated No longer used internally — bars now scale proportionally via columnStats.absMax */
|
|
23
22
|
unitScaling: number;
|
|
24
|
-
/** @deprecated No longer used internally — pins now scale proportionally via columnStats.absMax */
|
|
25
23
|
percentageScaling: number;
|
|
26
24
|
scaleFactor: number;
|
|
27
25
|
}
|