@bino-bi/bn-template-engine 1.0.0-next.47 → 1.0.0-next.49

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.
Files changed (119) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/{p-b3f5eba0.entry.js → p-2de524d0.entry.js} +1 -1
  3. package/dist/bn-template-engine/{p-a6017fce.entry.js → p-510d2ee6.entry.js} +1 -1
  4. package/dist/bn-template-engine/{p-6ab684a9.entry.js → p-8fc90dc8.entry.js} +1 -1
  5. package/dist/bn-template-engine/p-BFl7OwcC.js +1 -0
  6. package/dist/bn-template-engine/{p-3ktFZb1x.js → p-Bxa4pX1M.js} +1 -1
  7. package/dist/bn-template-engine/p-c1d679af.entry.js +1 -0
  8. package/dist/cjs/bn-annotation-layer_30.cjs.entry.js +632 -112
  9. package/dist/cjs/bn-grid.cjs.entry.js +1 -1
  10. package/dist/cjs/bn-image.cjs.entry.js +1 -1
  11. package/dist/cjs/bn-template-engine.cjs.js +1 -1
  12. package/dist/cjs/bn-text.cjs.entry.js +2 -2
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/cjs/{withStyled-DHKHBdRb.js → withStyled-pkdctrK9.js} +18 -1
  15. package/dist/cjs/{withTranslation-CLwC9a8V.js → withTranslation-BIzTNYZM.js} +1 -1
  16. package/dist/collection/components/bn-annotation-layer/bn-annotation-layer.css +19 -0
  17. package/dist/collection/components/bn-annotation-layer/bn-annotation-layer.js +65 -8
  18. package/dist/collection/components/bn-annotation-layer/utils/marks.js +85 -5
  19. package/dist/collection/components/bn-annotation-layer/utils/matchPoint.js +7 -1
  20. package/dist/collection/components/bn-chart-time/bn-chart-time-renderer/bn-chart-time-renderer.js +20 -6
  21. package/dist/collection/components/bn-chart-time/bn-chart-time.js +55 -23
  22. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +329 -53
  23. package/dist/collection/components/bn-chart-time/utils/elements/Column.js +4 -1
  24. package/dist/collection/components/bn-chart-time/utils/elements/Label.js +2 -1
  25. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +53 -11
  26. package/dist/collection/components/bn-layout-page/bn-layout-page.js +1 -23
  27. package/dist/collection/components/bn-title/bn-title-renderer/bn-title-renderer.css +0 -10
  28. package/dist/collection/components/bn-title/bn-title-renderer/bn-title-renderer.js +1 -23
  29. package/dist/collection/components/bn-title/bn-title.js +1 -20
  30. package/dist/collection/utils/annotations.js +1 -1
  31. package/dist/collection/utils/constants.js +2 -0
  32. package/dist/collection/utils/layoutState/svgChartElements.js +10 -0
  33. package/dist/collection/utils/validate.js +16 -1
  34. package/dist/components/bn-annotation-layer.js +1 -1
  35. package/dist/components/bn-annotation-list.js +1 -1
  36. package/dist/components/bn-chart-bubble-renderer.js +1 -1
  37. package/dist/components/bn-chart-bubble.js +1 -1
  38. package/dist/components/bn-chart-bullet-renderer.js +1 -1
  39. package/dist/components/bn-chart-bullet.js +1 -1
  40. package/dist/components/bn-chart-scatter-renderer.js +1 -1
  41. package/dist/components/bn-chart-scatter.js +1 -1
  42. package/dist/components/bn-chart-structure-renderer.js +1 -1
  43. package/dist/components/bn-chart-structure.js +1 -1
  44. package/dist/components/bn-chart-time-renderer.js +1 -1
  45. package/dist/components/bn-chart-time.js +1 -1
  46. package/dist/components/bn-grid.js +1 -1
  47. package/dist/components/bn-image.js +1 -1
  48. package/dist/components/bn-layout-card.js +1 -1
  49. package/dist/components/bn-layout-page.js +1 -1
  50. package/dist/components/bn-page.js +1 -1
  51. package/dist/components/bn-table-renderer.js +1 -1
  52. package/dist/components/bn-table.js +1 -1
  53. package/dist/components/bn-text.js +1 -1
  54. package/dist/components/bn-title-renderer.js +1 -1
  55. package/dist/components/bn-title.js +1 -1
  56. package/dist/components/bn-tree.js +1 -1
  57. package/dist/components/{p-CLjuZoiT.js → p-B11cXOLy.js} +1 -1
  58. package/dist/components/p-BBdzTx8V.js +1 -0
  59. package/dist/components/p-BVNOmHh4.js +1 -0
  60. package/dist/components/p-BXP6aagM.js +1 -0
  61. package/dist/components/{p-CG-iY7pQ.js → p-Blre9f28.js} +1 -1
  62. package/dist/components/p-CHJ6WE0l.js +1 -0
  63. package/dist/components/{p-Do4GqlMV.js → p-CHhxQoF9.js} +1 -1
  64. package/dist/components/{p-C-3TOa6K.js → p-CJ0-xdfZ.js} +1 -1
  65. package/dist/components/{p-BFoRIqDi.js → p-CO6bgquz.js} +1 -1
  66. package/dist/components/{p-CytMTBFu.js → p-CSJCkHEL.js} +1 -1
  67. package/dist/components/p-CVfmhtEW.js +1 -0
  68. package/dist/components/{p-Zuxd3z0q.js → p-Cc0gaLwp.js} +1 -1
  69. package/dist/components/p-CuUfiEu0.js +1 -0
  70. package/dist/components/{p-DUZCLRVu.js → p-D362XOg2.js} +1 -1
  71. package/dist/components/p-DBj1Yd3M.js +1 -0
  72. package/dist/components/{p-BjgkgCAQ.js → p-DHX92KDP.js} +1 -1
  73. package/dist/components/p-DHloMyxV.js +1 -0
  74. package/dist/components/{p-Uc0zvXcQ.js → p-Dd1QOWDV.js} +1 -1
  75. package/dist/components/p-DguYWLBj.js +1 -0
  76. package/dist/components/p-Do-IGHJk.js +1 -0
  77. package/dist/components/{p-DDo-fu3v.js → p-DsC0ew4j.js} +1 -1
  78. package/dist/components/p-HVN8BNWN.js +1 -0
  79. package/dist/components/{p-Dyzb4ika.js → p-YSRTB0jS.js} +1 -1
  80. package/dist/components/{p-CrZ_O3DT.js → p-k7heRDPP.js} +1 -1
  81. package/dist/components/{p-dO0utE8m.js → p-keKnrAVS.js} +1 -1
  82. package/dist/components/p-x0W2_FAX.js +1 -0
  83. package/dist/components/{p-BgdoWKFY.js → p-y12CmIFS.js} +1 -1
  84. package/dist/esm/bn-annotation-layer_30.entry.js +632 -112
  85. package/dist/esm/bn-grid.entry.js +1 -1
  86. package/dist/esm/bn-image.entry.js +1 -1
  87. package/dist/esm/bn-template-engine.js +1 -1
  88. package/dist/esm/bn-text.entry.js +2 -2
  89. package/dist/esm/loader.js +1 -1
  90. package/dist/esm/{withStyled-CTZFjg4L.js → withStyled-B62R20Zx.js} +18 -1
  91. package/dist/esm/{withTranslation-BESW5BNq.js → withTranslation-BEseMLQ6.js} +1 -1
  92. package/dist/types/components/bn-annotation-layer/utils/marks.d.ts +48 -0
  93. package/dist/types/components/bn-annotation-layer/utils/matchPoint.d.ts +4 -0
  94. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +29 -6
  95. package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +51 -2
  96. package/dist/types/components/bn-chart-time/utils/elements/StackedColumn.d.ts +5 -1
  97. package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +6 -0
  98. package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +0 -9
  99. package/dist/types/components/bn-title/bn-title-renderer/bn-title-renderer.d.ts +0 -2
  100. package/dist/types/components/bn-title/bn-title.d.ts +0 -5
  101. package/dist/types/components.d.ts +6 -27
  102. package/dist/types/utils/annotations.d.ts +11 -1
  103. package/dist/types/utils/constants.d.ts +3 -1
  104. package/dist/types/utils/layoutState/types.d.ts +2 -0
  105. package/package.json +1 -1
  106. package/dist/bn-template-engine/p-444a231f.entry.js +0 -1
  107. package/dist/bn-template-engine/p-DXtYQE4s.js +0 -1
  108. package/dist/components/p-6gET6YXc.js +0 -1
  109. package/dist/components/p-BFWvVe7v.js +0 -1
  110. package/dist/components/p-C8rpOS5t.js +0 -1
  111. package/dist/components/p-CUoPUIej.js +0 -1
  112. package/dist/components/p-D3hr9wra.js +0 -1
  113. package/dist/components/p-DFybNETX.js +0 -1
  114. package/dist/components/p-DJSj3oQq.js +0 -1
  115. package/dist/components/p-DRmphEA0.js +0 -1
  116. package/dist/components/p-D_K7tYhY.js +0 -1
  117. package/dist/components/p-Dw3rv_Y9.js +0 -1
  118. package/dist/components/p-TNX3alPU.js +0 -1
  119. package/dist/components/p-j42D1yrQ.js +0 -1
@@ -22,6 +22,13 @@ type TimeChartDataModelEntry = {
22
22
  scenario2: DataPoint;
23
23
  scenario3: DataPoint;
24
24
  scenario4: DataPoint;
25
+ /** Stack by dimension: the series of the period, in the same order in every period. */
26
+ series?: StackSeries[];
27
+ };
28
+ /** One series of a stack by dimension: its value per scenario slot in one period. */
29
+ type StackSeries = {
30
+ key: string;
31
+ points: Record<string, DataPoint>;
25
32
  };
26
33
  /**
27
34
  * Orchestrates the full rendering pipeline for an IBCS time series chart.
@@ -133,8 +140,20 @@ export declare class TimeChart {
133
140
  private failQuery;
134
141
  getAllocatedCanvasWidth(): number;
135
142
  getAllocatedCanvasHeight(): number;
136
- /** Room for the scenario names under the category labels of a series that changes its scenario. */
143
+ /**
144
+ * Room for the second row under the category labels: the scenario names of a
145
+ * `scenarioSwitch` chart, and in `two-row` mode the parent periods.
146
+ */
137
147
  private switchNamesHeight;
148
+ /** The parent period of a period in `two-row` mode: the year of a month, quarter or week, the month of a day. */
149
+ private parentPeriodLabel;
150
+ /**
151
+ * The texts of the second row under the category labels. `two-row` mode: the
152
+ * parent period under the first period and where it changes, joined with the
153
+ * scenario name where a run starts, each under its period. Else the scenario
154
+ * names alone, each under the middle of its run.
155
+ */
156
+ private contextRow;
138
157
  /** True for a scenario slot that has a value in this period. */
139
158
  private static hasValue;
140
159
  /**
@@ -146,6 +165,12 @@ export declare class TimeChart {
146
165
  private visibleSlot;
147
166
  /** Runs of periods with the same visible scenario. A period without a value belongs to the run before it. */
148
167
  private switchRuns;
168
+ /**
169
+ * Stack by dimensions with `scenarioSwitch`: the scenarios with values that
170
+ * are not drawn, because they have values in periods of the first scenario
171
+ * or because the chart is a stacked area. The component warns about them.
172
+ */
173
+ getIgnoredSwitchScenarios(): string[];
149
174
  /** Number of periods where variances of one row overlap. The component warns about it. */
150
175
  getVarianceOverlaps(): number;
151
176
  /**
@@ -208,6 +233,11 @@ export declare class TimeChart {
208
233
  private scenarioStyles;
209
234
  private setAxisScenario;
210
235
  private populateModel;
236
+ /**
237
+ * Stack by dimension: one series per `category`, ordered by `categoryIndex`, else by first appearance.
238
+ * Every period gets every series, so a series keeps its place and colour when a value is missing.
239
+ */
240
+ private populateSeries;
211
241
  private detectNaNCells;
212
242
  private findDateInterval;
213
243
  /** Distinct dates of the filtered rows. Min and max are taken in JS: alasql MIN/MAX skip ISO strings. */
@@ -265,13 +295,28 @@ export declare class TimeChart {
265
295
  * Positive segments stack above the axis, negative segments below it.
266
296
  */
267
297
  private drawStackedScenarios;
298
+ /** True for a 100 % stack that prints plain shares and one `100%` mark. */
299
+ private hasPercentMark;
300
+ /** The side of the `100%` mark: with the series names, at the left when they stand on both sides or nowhere. */
301
+ private percentMarkSide;
302
+ /** The name of a series of a stack by dimension. A translation of the category wins. */
303
+ private seriesName;
304
+ /**
305
+ * Width of the widest text the stack writes on one side of the columns, 0 when
306
+ * there is none. The names of a stack by scenario at the left are part of the
307
+ * left offset the component hands in, so they do not count here.
308
+ */
309
+ private legendWidth;
268
310
  /**
269
311
  * Draw column headers next to stacked columns showing what each group/segment represents.
270
312
  * For overlay mode (multiple scenario types): shows one header per group.
271
313
  * For single-group: shows individual segment headers.
272
- * The headers take their place from the first period.
314
+ * The headers at the left take their place from the first period, the ones at
315
+ * the right from the last period with a value.
273
316
  */
274
317
  private drawStackedHeaders;
318
+ /** The `100%` label with a pointer at the upper end of a 100 % stack, on the side of the series names. */
319
+ private drawPercentMark;
275
320
  /**
276
321
  * Draw stacked area chart (line mode with stack).
277
322
  * Computes cumulative y-values and draws AreaFill paths between layers.
@@ -289,6 +334,8 @@ export declare function tranformToAvgDataModel(dataModel: TimeChartDataModelEntr
289
334
  scenario2: DataPoint;
290
335
  scenario3: DataPoint;
291
336
  scenario4: DataPoint;
337
+ /** Stack by dimension: the series of the period, in the same order in every period. */
338
+ series?: StackSeries[];
292
339
  }[];
293
340
  export declare function tranformToMedianDataModel(dataModel: TimeChartDataModelEntry[]): {
294
341
  scenario1: DataPoint;
@@ -299,5 +346,7 @@ export declare function tranformToMedianDataModel(dataModel: TimeChartDataModelE
299
346
  scenario2: DataPoint;
300
347
  scenario3: DataPoint;
301
348
  scenario4: DataPoint;
349
+ /** Stack by dimension: the series of the period, in the same order in every period. */
350
+ series?: StackSeries[];
302
351
  }[];
303
352
  export {};
@@ -22,6 +22,8 @@ import { DataPointKey } from "../../../../utils/layoutState/types";
22
22
  * The last segment can draw the total label of the full stack via drawTotalLabel().
23
23
  */
24
24
  export declare class StackedColumn {
25
+ private readonly notation;
26
+ private readonly plainShares;
25
27
  private readonly position;
26
28
  private readonly styles;
27
29
  private readonly group;
@@ -33,8 +35,10 @@ export declare class StackedColumn {
33
35
  private readonly stackMode;
34
36
  private readonly stack;
35
37
  private hasData;
36
- constructor(position: ElementPositions, styles: TimeChartStyle, dataPoint: DataPoint, index: number, segment: StackSegment, _segmentLabel: string | null, segmentIndex: number, stackMode: StackMode, stack: StackLayout, _isScenarioStack: boolean, parentGroup: G);
38
+ constructor(position: ElementPositions, styles: TimeChartStyle, dataPoint: DataPoint, index: number, segment: StackSegment, _segmentLabel: string | null, segmentIndex: number, stackMode: StackMode, stack: StackLayout, _isScenarioStack: boolean, parentGroup: G, notation?: boolean, plainShares?: boolean);
37
39
  draw(dataFormatDigits?: DataFormatDigits, measureScale?: SiPrefix): void;
40
+ /** The hatching of a forecast over the shade of the series. One pattern per shade in the SVG. */
41
+ private hatchPattern;
38
42
  /**
39
43
  * Draw the signed total of the stack: above the positive side, or below the negative side for a negative total.
40
44
  */
@@ -11,6 +11,12 @@ export interface StackConfigParsed {
11
11
  by: StackBy;
12
12
  mode: StackMode;
13
13
  order: StackOrder;
14
+ /** `scenario`: a segment takes the look of its scenario (FC hatched, PL outlined). */
15
+ notation: "none" | "scenario";
16
+ /** Where the series names stand: at the first column, at the last one, at both, or nowhere. */
17
+ legend: "left" | "right" | "both" | "none";
18
+ /** 100 % stack: shares as plain numbers and one `100%` mark on the legend side. */
19
+ percentMark: boolean;
14
20
  }
15
21
  /**
16
22
  * Configuration for an IBCS time-series chart component.
@@ -40,15 +40,6 @@ export declare class LayoutPage {
40
40
  * <bn-layout-page message-image="debug/concordia.png"></bn-layout-page>
41
41
  */
42
42
  messageImage: string;
43
- /**
44
- * Short id of the page, a template number like `13A`. Shown at the top
45
- * right of the title, on the level of its first line, in the font of the
46
- * title and not bold. If empty, nothing is shown.
47
- *
48
- * @example
49
- * <bn-layout-page title-id="13A"></bn-layout-page>
50
- */
51
- titleId?: string;
52
43
  /**
53
44
  * Name of the business unit displayed in the title header row.
54
45
  * If empty, the business unit row is omitted.
@@ -29,8 +29,6 @@ export declare class BnTitleRenderer {
29
29
  locale: string;
30
30
  /** @internal */
31
31
  ruleSetConfig?: RuleSetConfig;
32
- /** @internal */
33
- titleId?: string;
34
32
  private title;
35
33
  render(): any;
36
34
  componentWillLoad(): void;
@@ -35,11 +35,6 @@ export declare class Title {
35
35
  * the style (`global.fontSizePx`).
36
36
  */
37
37
  readonly titleFontSize?: number;
38
- /**
39
- * Short id of the report, a template number like `13A`. Shown at the top
40
- * right, on the level of the first title line. Without it nothing is shown.
41
- */
42
- readonly titleId?: string;
43
38
  /** Name of the business unit displayed in card header. If empty string (`''` or `null`) the business unit row is omitted
44
39
  * <br /><br />
45
40
  * Rendered as sanitized HTML, so inline markup such as ```<b>```, ```<i>``` and ```<br />``` is supported.
@@ -909,7 +909,7 @@ export namespace Components {
909
909
  */
910
910
  interface BnChartTime {
911
911
  /**
912
- * Axis Labels Mode defines in which mode the labels are rendered. long, and short mode uses the long an short styles for the date smart only displays relevant information if a change/ transition occured (eg. only on 1.Jan the year is displayed) <br /><br /> values:<br /> ```smart // long // short```
912
+ * Axis Labels Mode defines in which mode the labels are rendered. long, and short mode uses the long an short styles for the date smart only displays relevant information if a change/ transition occured (eg. only on 1.Jan the year is displayed) two-row prints short labels and puts the parent period (the year of a month, quarter or week) in a second row, under the first period and where it changes. With scenario-switch the scenario names stand in the same row. <br /><br /> values:<br /> ```smart // long // short // two-row```
913
913
  */
914
914
  "axisLabelsMode": string;
915
915
  /**
@@ -1008,7 +1008,7 @@ export namespace Components {
1008
1008
  */
1009
1009
  "scale"?: string;
1010
1010
  /**
1011
- * For a series that changes its scenario along the time axis, for example AC up to this year and PL after it. In a period where the first scenario has no value, the next scenario with a value is drawn in its place with its value label. A vertical line marks the change, and the scenario names stand under the axis. Variances with the same reference and type share one row. Bar mode without stack only.
1011
+ * For a series that changes its scenario along the time axis, for example AC up to this year and PL after it. In a period where the first scenario has no value, the next scenario with a value is drawn in its place with its value label. A vertical line marks the change, and the scenario names stand under the axis. Variances with the same reference and type share one row. A chart with one scenario gets the name of that scenario under the axis. Bar mode, without a stack or with a stack by dimensions.
1012
1012
  * @default false
1013
1013
  */
1014
1014
  "scenarioSwitch": boolean;
@@ -1038,7 +1038,7 @@ export namespace Components {
1038
1038
  */
1039
1039
  "showOverlayMedian": boolean;
1040
1040
  /**
1041
- * Stacking configuration for the chart as a JSON string. When set, bars/columns are drawn stacked (additive layers) instead of side-by-side. In line mode (`chart-mode="line"`), stacking produces a stacked area chart with filled regions between cumulative lines. **JSON schema:** ```json { "by": "scenarios" | "dimensions", "mode": "absolute" | "relative" | "absolute-relative", "order": "asc" | "desc" | "dataset" } ``` - `by` (required): What a stack is made of. - `"scenarios"` - stack the scenarios from the `scenarios` prop as layers. - `"dimensions"` - only the first scenario is drawn. A time chart has one value per period, so each stack has one segment. - `mode` (optional, default `"absolute"`): - `"absolute"` - additive stacking, axis shows absolute units. - `"relative"` - 100% stacking, axis shows 0%-100%. `unit-scaling` is interpreted as pixels per percentage point (e.g. `0.4` → 40px full stack); `"auto"` fits the stack to the available height as usual. - `"absolute-relative"` - bar height is absolute (real value), but segment labels inside show percentages. - `order` (optional, default `"dataset"`): Segment order within each stack. `"asc"` / `"desc"` sort segments by value; `"dataset"` preserves the original data/scenario order.
1041
+ * Stacking configuration for the chart as a JSON string. When set, bars/columns are drawn stacked (additive layers) instead of side-by-side. In line mode (`chart-mode="line"`), stacking produces a stacked area chart with filled regions between cumulative lines. **JSON schema:** ```json { "by": "scenarios" | "dimensions", "mode": "absolute" | "relative" | "absolute-relative", "order": "asc" | "desc" | "dataset", "notation": "none" | "scenario", "legend": "left" | "right" | "both" | "none", "percentMark": true | false } ``` - `by` (required): What a stack is made of. - `"scenarios"` - stack the scenarios from the `scenarios` prop as layers, four at most. - `"dimensions"` - one segment per value of the `category` column of the dataset, ordered by `categoryIndex`, else by first appearance. There is no limit on the number of series, and a series keeps its colour in every period. The first scenario is drawn. With `scenario-switch` the scenario that has values in the period is drawn, so one axis can go from AC to FC to PL. - `mode` (optional, default `"absolute"`): - `"absolute"` - additive stacking, axis shows absolute units. - `"relative"` - 100% stacking, axis shows 0%-100%. `unit-scaling` is interpreted as pixels per percentage point (e.g. `0.4` → 40px full stack); `"auto"` fits the stack to the available height as usual. - `"absolute-relative"` - bar height is absolute (real value), but segment labels inside show percentages. - `order` (optional, default `"dataset"`): Segment order within each stack. `"asc"` / `"desc"` sort segments by value; `"dataset"` preserves the original data/scenario order. - `notation` (optional, default `"none"`): with `"scenario"` a segment takes the look of its scenario. A forecast segment is hatched over the shade of its series, a plan segment is outlined, and the first series takes the fill of the scenario from `barStyles`. - `legend` (optional, default `"left"`): where the series names stand. Left of the first column, right of the last column with a value, at both, or nowhere. - `percentMark` (optional, default `false`): for `mode: "relative"`. The shares are plain numbers without the % sign, with `data-format-digits-percent` digits, and one `100%` mark stands at the upper end of the stack, on the side of the series names.
1042
1042
  * @default '' (empty - no stacking)
1043
1043
  * @example // Stack scenarios stack='{"by":"scenarios"}'
1044
1044
  * @example // Stack scenarios, relative mode stack='{"by":"scenarios","mode":"relative"}'
@@ -1644,11 +1644,6 @@ export namespace Components {
1644
1644
  * Start date displayed in the title date row. Accepts `yyyy-MM-dd` (e.g. `2024-01-01`) or ISO 8601 datetime (e.g. `2024-01-01T14:30:00Z`).
1645
1645
  */
1646
1646
  "titleDateStart"?: string;
1647
- /**
1648
- * Short id of the page, a template number like `13A`. Shown at the top right of the title, on the level of its first line, in the font of the title and not bold. If empty, nothing is shown.
1649
- * @example <bn-layout-page title-id="13A"></bn-layout-page>
1650
- */
1651
- "titleId"?: string;
1652
1647
  /**
1653
1648
  * Array of measure objects with `name` and `unit` displayed in the title. Passed as a JSON string. If all units are the same, redundant units are reduced and names concatenated. If empty, the measure row is omitted.
1654
1649
  * @example <bn-layout-page title-measures='[{"name":"Revenue","unit":"mEUR"}]'></bn-layout-page>
@@ -2188,10 +2183,6 @@ export namespace Components {
2188
2183
  * Font size of the title in px. Without it the title has the font size of the style (`global.fontSizePx`).
2189
2184
  */
2190
2185
  "titleFontSize"?: number;
2191
- /**
2192
- * Short id of the report, a template number like `13A`. Shown at the top right, on the level of the first title line. Without it nothing is shown.
2193
- */
2194
- "titleId"?: string;
2195
2186
  /**
2196
2187
  * <br /> <br /> List of Variances The additonal variances which are calculated form the given scenarios. the scenarios used in the variances have also be defined in the *scenarios* property. <br /> <br /> the variance is defiend as (Scenario A - ScenarioB) neu. neg and pos post fix defines which value is *good* a negative or a positive value. <br /> <br /> if empty variance charts are hidden <br /> <br /> each variance creates a chart <br /> <br /> pattern:<br /> ```d<scenarioB>_<scenarioA>_[pos/neg/neu/op/opinv]```
2197
2188
  */
@@ -2233,7 +2224,6 @@ export namespace Components {
2233
2224
  */
2234
2225
  "scenarios": string[];
2235
2226
  "timeperiod"?: TimePeriod;
2236
- "titleId"?: string;
2237
2227
  }
2238
2228
  /**
2239
2229
  * Renders a hierarchical tree diagram with SVG edge connections.
@@ -3250,7 +3240,7 @@ declare namespace LocalJSX {
3250
3240
  */
3251
3241
  interface BnChartTime {
3252
3242
  /**
3253
- * Axis Labels Mode defines in which mode the labels are rendered. long, and short mode uses the long an short styles for the date smart only displays relevant information if a change/ transition occured (eg. only on 1.Jan the year is displayed) <br /><br /> values:<br /> ```smart // long // short```
3243
+ * Axis Labels Mode defines in which mode the labels are rendered. long, and short mode uses the long an short styles for the date smart only displays relevant information if a change/ transition occured (eg. only on 1.Jan the year is displayed) two-row prints short labels and puts the parent period (the year of a month, quarter or week) in a second row, under the first period and where it changes. With scenario-switch the scenario names stand in the same row. <br /><br /> values:<br /> ```smart // long // short // two-row```
3254
3244
  */
3255
3245
  "axisLabelsMode": string;
3256
3246
  /**
@@ -3340,7 +3330,7 @@ declare namespace LocalJSX {
3340
3330
  */
3341
3331
  "scale"?: string;
3342
3332
  /**
3343
- * For a series that changes its scenario along the time axis, for example AC up to this year and PL after it. In a period where the first scenario has no value, the next scenario with a value is drawn in its place with its value label. A vertical line marks the change, and the scenario names stand under the axis. Variances with the same reference and type share one row. Bar mode without stack only.
3333
+ * For a series that changes its scenario along the time axis, for example AC up to this year and PL after it. In a period where the first scenario has no value, the next scenario with a value is drawn in its place with its value label. A vertical line marks the change, and the scenario names stand under the axis. Variances with the same reference and type share one row. A chart with one scenario gets the name of that scenario under the axis. Bar mode, without a stack or with a stack by dimensions.
3344
3334
  * @default false
3345
3335
  */
3346
3336
  "scenarioSwitch"?: boolean;
@@ -3370,7 +3360,7 @@ declare namespace LocalJSX {
3370
3360
  */
3371
3361
  "showOverlayMedian"?: boolean;
3372
3362
  /**
3373
- * Stacking configuration for the chart as a JSON string. When set, bars/columns are drawn stacked (additive layers) instead of side-by-side. In line mode (`chart-mode="line"`), stacking produces a stacked area chart with filled regions between cumulative lines. **JSON schema:** ```json { "by": "scenarios" | "dimensions", "mode": "absolute" | "relative" | "absolute-relative", "order": "asc" | "desc" | "dataset" } ``` - `by` (required): What a stack is made of. - `"scenarios"` - stack the scenarios from the `scenarios` prop as layers. - `"dimensions"` - only the first scenario is drawn. A time chart has one value per period, so each stack has one segment. - `mode` (optional, default `"absolute"`): - `"absolute"` - additive stacking, axis shows absolute units. - `"relative"` - 100% stacking, axis shows 0%-100%. `unit-scaling` is interpreted as pixels per percentage point (e.g. `0.4` → 40px full stack); `"auto"` fits the stack to the available height as usual. - `"absolute-relative"` - bar height is absolute (real value), but segment labels inside show percentages. - `order` (optional, default `"dataset"`): Segment order within each stack. `"asc"` / `"desc"` sort segments by value; `"dataset"` preserves the original data/scenario order.
3363
+ * Stacking configuration for the chart as a JSON string. When set, bars/columns are drawn stacked (additive layers) instead of side-by-side. In line mode (`chart-mode="line"`), stacking produces a stacked area chart with filled regions between cumulative lines. **JSON schema:** ```json { "by": "scenarios" | "dimensions", "mode": "absolute" | "relative" | "absolute-relative", "order": "asc" | "desc" | "dataset", "notation": "none" | "scenario", "legend": "left" | "right" | "both" | "none", "percentMark": true | false } ``` - `by` (required): What a stack is made of. - `"scenarios"` - stack the scenarios from the `scenarios` prop as layers, four at most. - `"dimensions"` - one segment per value of the `category` column of the dataset, ordered by `categoryIndex`, else by first appearance. There is no limit on the number of series, and a series keeps its colour in every period. The first scenario is drawn. With `scenario-switch` the scenario that has values in the period is drawn, so one axis can go from AC to FC to PL. - `mode` (optional, default `"absolute"`): - `"absolute"` - additive stacking, axis shows absolute units. - `"relative"` - 100% stacking, axis shows 0%-100%. `unit-scaling` is interpreted as pixels per percentage point (e.g. `0.4` → 40px full stack); `"auto"` fits the stack to the available height as usual. - `"absolute-relative"` - bar height is absolute (real value), but segment labels inside show percentages. - `order` (optional, default `"dataset"`): Segment order within each stack. `"asc"` / `"desc"` sort segments by value; `"dataset"` preserves the original data/scenario order. - `notation` (optional, default `"none"`): with `"scenario"` a segment takes the look of its scenario. A forecast segment is hatched over the shade of its series, a plan segment is outlined, and the first series takes the fill of the scenario from `barStyles`. - `legend` (optional, default `"left"`): where the series names stand. Left of the first column, right of the last column with a value, at both, or nowhere. - `percentMark` (optional, default `false`): for `mode: "relative"`. The shares are plain numbers without the % sign, with `data-format-digits-percent` digits, and one `100%` mark stands at the upper end of the stack, on the side of the series names.
3374
3364
  * @default '' (empty - no stacking)
3375
3365
  * @example // Stack scenarios stack='{"by":"scenarios"}'
3376
3366
  * @example // Stack scenarios, relative mode stack='{"by":"scenarios","mode":"relative"}'
@@ -3840,11 +3830,6 @@ declare namespace LocalJSX {
3840
3830
  * Start date displayed in the title date row. Accepts `yyyy-MM-dd` (e.g. `2024-01-01`) or ISO 8601 datetime (e.g. `2024-01-01T14:30:00Z`).
3841
3831
  */
3842
3832
  "titleDateStart"?: string;
3843
- /**
3844
- * Short id of the page, a template number like `13A`. Shown at the top right of the title, on the level of its first line, in the font of the title and not bold. If empty, nothing is shown.
3845
- * @example <bn-layout-page title-id="13A"></bn-layout-page>
3846
- */
3847
- "titleId"?: string;
3848
3833
  /**
3849
3834
  * Array of measure objects with `name` and `unit` displayed in the title. Passed as a JSON string. If all units are the same, redundant units are reduced and names concatenated. If empty, the measure row is omitted.
3850
3835
  * @example <bn-layout-page title-measures='[{"name":"Revenue","unit":"mEUR"}]'></bn-layout-page>
@@ -4222,10 +4207,6 @@ declare namespace LocalJSX {
4222
4207
  * Font size of the title in px. Without it the title has the font size of the style (`global.fontSizePx`).
4223
4208
  */
4224
4209
  "titleFontSize"?: number;
4225
- /**
4226
- * Short id of the report, a template number like `13A`. Shown at the top right, on the level of the first title line. Without it nothing is shown.
4227
- */
4228
- "titleId"?: string;
4229
4210
  /**
4230
4211
  * <br /> <br /> List of Variances The additonal variances which are calculated form the given scenarios. the scenarios used in the variances have also be defined in the *scenarios* property. <br /> <br /> the variance is defiend as (Scenario A - ScenarioB) neu. neg and pos post fix defines which value is *good* a negative or a positive value. <br /> <br /> if empty variance charts are hidden <br /> <br /> each variance creates a chart <br /> <br /> pattern:<br /> ```d<scenarioB>_<scenarioA>_[pos/neg/neu/op/opinv]```
4231
4212
  */
@@ -4519,7 +4500,6 @@ declare namespace LocalJSX {
4519
4500
  "ruleset": string;
4520
4501
  "messageText": string;
4521
4502
  "messageImage": string;
4522
- "titleId": string;
4523
4503
  "titleBusinessUnit": string;
4524
4504
  "titleScenarios": string;
4525
4505
  "titleVariances": string;
@@ -4622,7 +4602,6 @@ declare namespace LocalJSX {
4622
4602
  "i18nNamespace": string;
4623
4603
  "ruleset": string;
4624
4604
  "titleFontSize": number;
4625
- "titleId": string;
4626
4605
  "businessUnit": string;
4627
4606
  "scenarios": string;
4628
4607
  "variances": string;
@@ -14,7 +14,7 @@ export interface AnnotationPoint {
14
14
  export interface AnnotationLayerItem {
15
15
  /** Number on the mark. Absent when the annotation has none. */
16
16
  label?: string;
17
- mark?: "marker" | "frame" | "arrow";
17
+ mark?: "marker" | "frame" | "arrow" | "difference";
18
18
  /** Named colour, see {@link annotationColor}. */
19
19
  color?: string;
20
20
  /** `data-bino-annotation-target` of the slot that holds the component. */
@@ -22,6 +22,16 @@ export interface AnnotationLayerItem {
22
22
  point?: AnnotationPoint;
23
23
  to?: string;
24
24
  toPoint?: AnnotationPoint;
25
+ /** `frame`: a text the frame is drawn around, on the target. `difference`: not used. */
26
+ text?: string;
27
+ /** `difference`: also print the relative difference, in brackets. */
28
+ percent?: boolean;
29
+ /** `difference`: digits of the absolute difference, 1 by default. */
30
+ digits?: number;
31
+ /** `difference`: `good-down` when a lower value is the good one. */
32
+ sentiment?: "good-up" | "good-down";
33
+ /** `difference`: a frame around the relative difference. */
34
+ highlight?: boolean;
25
35
  }
26
36
  /** One entry of the `items` attribute of `bn-annotation-list`. */
27
37
  export interface AnnotationListItem {
@@ -113,11 +113,13 @@ export declare enum AggregationLevel {
113
113
  * - SMART: abbreviated labels with parent period shown at boundary crossings (e.g. "Jan" normally, "Jan 2024" at year boundary)
114
114
  * - LONG: full date format for every label
115
115
  * - SHORT: abbreviated format for every label
116
+ * - TWO_ROW: abbreviated labels, and the parent period (the year of a month) in a second row where it starts
116
117
  */
117
118
  export declare enum AxisLabelsMode {
118
119
  SMART = "smart",
119
120
  LONG = "long",
120
- SHORT = "short"
121
+ SHORT = "short",
122
+ TWO_ROW = "two-row"
121
123
  }
122
124
  /**
123
125
  * Visual representation type for chart series.
@@ -98,6 +98,8 @@ export interface BarElement extends LayoutElementBase {
98
98
  /** Ordinal of the bar's category within the segment. */
99
99
  index: number;
100
100
  point?: LayoutPoint;
101
+ /** The value the bar stands for, when the chart writes it (`data-bn-value`). */
102
+ value?: number;
101
103
  }
102
104
  export interface LabelElement extends LayoutElementBase {
103
105
  kind: "label";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bino-bi/bn-template-engine",
3
- "version": "1.0.0-next.47",
3
+ "version": "1.0.0-next.49",
4
4
  "description": "IBCS-compliant web components for business intelligence tables and charts",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",