@bino-bi/bn-template-engine 1.0.0-next.30 → 1.0.0-next.32
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-64803a42.entry.js → p-14d021be.entry.js} +1 -1
- package/dist/bn-template-engine/p-225cd474.entry.js +1 -0
- package/dist/bn-template-engine/p-58b10778.entry.js +1 -0
- package/dist/bn-template-engine/{p-40ba7f43.entry.js → p-7d475277.entry.js} +1 -1
- package/dist/bn-template-engine/p-9f3cbc5f.entry.js +1 -0
- package/dist/bn-template-engine/p-BNCLKXjM.js +1 -0
- package/dist/bn-template-engine/{p-B8AjeKja.js → p-BTbeDWM9.js} +1 -1
- package/dist/bn-template-engine/{p-Z2rUaSh_.js → p-BjR3nkhl.js} +1 -1
- package/dist/bn-template-engine/p-CHZ50kEY.js +1 -0
- package/dist/bn-template-engine/p-CJfJQT0m.js +1 -0
- package/dist/bn-template-engine/p-ce39e111.entry.js +1 -0
- package/dist/cjs/bn-annotation-layer_30.cjs.entry.js +191 -68
- package/dist/cjs/bn-grid.cjs.entry.js +465 -34
- package/dist/cjs/bn-image.cjs.entry.js +2 -2
- package/dist/cjs/bn-internationalization.cjs.entry.js +2 -2
- package/dist/cjs/bn-ruleset.cjs.entry.js +2 -2
- package/dist/cjs/bn-template-engine.cjs.js +1 -1
- package/dist/cjs/bn-text.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{diagnostics-C4Ggts3w.js → localFrame-P5SDUOto.js} +90 -1
- package/dist/cjs/{withBodyObserver-BK4idxqG.js → withBodyObserver-B1_hmuUz.js} +1 -1
- package/dist/cjs/{withHasError-CqvcS23z.js → withHasError-3kR2tdhJ.js} +4 -0
- package/dist/cjs/{withStyled-70D4Isgt.js → withStyled-Ds3e64Nz.js} +1 -1
- package/dist/cjs/{withTranslation-C6Pye2CM.js → withTranslation-Cjvvs3gL.js} +2 -2
- package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +32 -2
- package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +32 -2
- package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +3 -1
- package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +32 -2
- package/dist/collection/components/bn-chart-structure/bn-chart-structure-renderer/bn-chart-structure-renderer.js +1 -1
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +33 -2
- package/dist/collection/components/bn-chart-time/bn-chart-time-renderer/bn-chart-time-renderer.js +1 -1
- package/dist/collection/components/bn-chart-time/bn-chart-time.js +33 -2
- package/dist/collection/components/bn-grid/bn-grid.js +454 -26
- package/dist/collection/components/bn-grid/utils/cellLayout.js +111 -0
- package/dist/collection/components/bn-table/bn-table.js +39 -2
- package/dist/collection/stores/componentStyles.js +4 -0
- package/dist/collection/utils/layoutState/baseline.js +67 -0
- package/dist/collection/utils/layoutState/index.js +2 -0
- package/dist/collection/utils/layoutState/localFrame.js +87 -0
- package/dist/collection/utils/layoutState/svgChartElements.js +6 -2
- package/dist/collection/utils/xy/XYFrame.js +3 -1
- package/dist/components/bn-annotation-layer.js +1 -1
- package/dist/components/bn-annotation-list.js +1 -1
- package/dist/components/bn-asset.js +1 -1
- package/dist/components/bn-body.js +1 -1
- package/dist/components/bn-card.js +1 -1
- package/dist/components/bn-chart-bubble-renderer.js +1 -1
- package/dist/components/bn-chart-bubble.js +1 -1
- package/dist/components/bn-chart-bullet-renderer.js +1 -1
- package/dist/components/bn-chart-bullet.js +1 -1
- package/dist/components/bn-chart-scatter-renderer.js +1 -1
- package/dist/components/bn-chart-scatter.js +1 -1
- package/dist/components/bn-chart-structure-renderer.js +1 -1
- package/dist/components/bn-chart-structure.js +1 -1
- package/dist/components/bn-chart-time-renderer.js +1 -1
- package/dist/components/bn-chart-time.js +1 -1
- package/dist/components/bn-component-style.js +1 -1
- package/dist/components/bn-context.js +1 -1
- package/dist/components/bn-dataset.js +1 -1
- package/dist/components/bn-datasource.js +1 -1
- package/dist/components/bn-footer.js +1 -1
- package/dist/components/bn-grid.js +1 -1
- package/dist/components/bn-image.js +1 -1
- package/dist/components/bn-internationalization.js +1 -1
- package/dist/components/bn-layout-card.js +1 -1
- package/dist/components/bn-layout-page.js +1 -1
- package/dist/components/bn-message.js +1 -1
- package/dist/components/bn-page.js +1 -1
- package/dist/components/bn-ruleset.js +1 -1
- package/dist/components/bn-scaling-group.js +1 -1
- package/dist/components/bn-table-renderer.js +1 -1
- package/dist/components/bn-table.js +1 -1
- package/dist/components/bn-text.js +1 -1
- package/dist/components/bn-title.js +1 -1
- package/dist/components/bn-tree.js +1 -1
- package/dist/components/p-0gehv1XG.js +1 -0
- package/dist/components/{p-Bs-YxJEt.js → p-8a2-IS-y.js} +1 -1
- package/dist/components/p-B2jqpOF9.js +1 -0
- package/dist/components/{p-BWBHlztH.js → p-BPJsmv3o.js} +1 -1
- package/dist/components/{p-BXrPfAvP.js → p-BVtD8O36.js} +1 -1
- package/dist/components/p-BcOud3dQ.js +1 -0
- package/dist/components/{p-DsOaqeTN.js → p-BoUkFdpu.js} +1 -1
- package/dist/components/p-BohXdw3-.js +1 -0
- package/dist/components/p-C6XrNN2m.js +1 -0
- package/dist/components/{p-Dm55bMs2.js → p-CDoSPw-I.js} +1 -1
- package/dist/components/p-CMCnX0iM.js +1 -0
- package/dist/components/{p-Ds_BSK8v.js → p-ClGOhg6P.js} +1 -1
- package/dist/components/p-CujsXn-l.js +1 -0
- package/dist/components/{p-Ba9PUiBp.js → p-D4FY_yoG.js} +1 -1
- package/dist/components/{p-DIyUaSBg.js → p-D6cWoDk1.js} +1 -1
- package/dist/components/p-D7X69xMg.js +1 -0
- package/dist/components/{p-B1nL0yOa.js → p-DSkyHSIL.js} +1 -1
- package/dist/components/{p-BSV_vyqs.js → p-De82WP7z.js} +1 -1
- package/dist/components/p-DyO09Jk6.js +1 -0
- package/dist/components/{p-WzaayhTX.js → p-Ku08TQL1.js} +1 -1
- package/dist/components/p-t4xPltK2.js +1 -0
- package/dist/components/{p-ey23VlID.js → p-yH-XxIy9.js} +1 -1
- package/dist/components/{p-X9hpquOX.js → p-z56_ZQ42.js} +1 -1
- package/dist/components/{p-B7uwck1J.js → p-zf8cTH63.js} +1 -1
- package/dist/esm/bn-annotation-layer_30.entry.js +140 -17
- package/dist/esm/bn-grid.entry.js +456 -25
- package/dist/esm/bn-image.entry.js +2 -2
- package/dist/esm/bn-internationalization.entry.js +2 -2
- package/dist/esm/bn-ruleset.entry.js +2 -2
- package/dist/esm/bn-template-engine.js +1 -1
- package/dist/esm/bn-text.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{diagnostics-Cyqy1zDT.js → localFrame-IW84cmdb.js} +90 -2
- package/dist/esm/{withBodyObserver-JcRB9OPQ.js → withBodyObserver-CAnnvrE_.js} +1 -1
- package/dist/esm/{withHasError-l3cMN-oP.js → withHasError-Cj_MzZ8Q.js} +4 -0
- package/dist/esm/{withStyled-DGOiR00Q.js → withStyled-B-cbWCe2.js} +1 -1
- package/dist/esm/{withTranslation-BpO8BC5B.js → withTranslation-_8q-7Y9C.js} +2 -2
- package/dist/schemas/theme.schema.json +14 -0
- package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +6 -1
- package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +6 -1
- package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +6 -1
- package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +6 -1
- package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +6 -1
- package/dist/types/components/bn-grid/bn-grid.d.ts +79 -3
- package/dist/types/components/bn-grid/utils/cellLayout.d.ts +47 -0
- package/dist/types/components/bn-table/bn-table.d.ts +8 -1
- package/dist/types/components.d.ts +94 -7
- package/dist/types/stores/componentStyles.d.ts +6 -0
- package/dist/types/utils/layoutState/baseline.d.ts +17 -0
- package/dist/types/utils/layoutState/index.d.ts +2 -0
- package/dist/types/utils/layoutState/localFrame.d.ts +17 -0
- package/dist/types/utils/layoutState/svgChartElements.d.ts +3 -1
- package/dist/types/utils/layoutState/types.d.ts +12 -2
- package/package.json +1 -1
- package/dist/bn-template-engine/p-132ad556.entry.js +0 -1
- package/dist/bn-template-engine/p-17d71782.entry.js +0 -1
- package/dist/bn-template-engine/p-467871f3.entry.js +0 -1
- package/dist/bn-template-engine/p-CrT83eO4.js +0 -1
- package/dist/bn-template-engine/p-D_DzKxRV.js +0 -1
- package/dist/bn-template-engine/p-c41c0a1b.entry.js +0 -1
- package/dist/bn-template-engine/p-yc69rwuH.js +0 -1
- package/dist/components/p-BDS_jiow.js +0 -1
- package/dist/components/p-BIIDTtcR.js +0 -1
- package/dist/components/p-BVKLCz2k.js +0 -1
- package/dist/components/p-CkW23yp2.js +0 -1
- package/dist/components/p-DUHp_9X-.js +0 -1
- package/dist/components/p-Dq1AzGKX.js +0 -1
- package/dist/components/p-U3zkcEJZ.js +0 -1
- package/dist/components/p-jbp6YiHf.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forceUpdate, h, Host, writeTask } from "@stencil/core";
|
|
2
2
|
import { hasInlineJs } from "../../context/scopedDb";
|
|
3
|
-
import { collectXYFacadeState, originsFor } from "../../utils/layoutState";
|
|
3
|
+
import { collectXYFacadeState, originsFor, readChartBaseline, } from "../../utils/layoutState";
|
|
4
4
|
import { globalLabelKeys } from "../../stores/internationalization";
|
|
5
5
|
import { getParentDimensions } from "../../utils/parentDimensions";
|
|
6
6
|
import { checkXYOverflow } from "../../utils/xy/checkXYOverflow";
|
|
@@ -566,6 +566,13 @@ export class ChartScatter {
|
|
|
566
566
|
};
|
|
567
567
|
});
|
|
568
568
|
}
|
|
569
|
+
/**
|
|
570
|
+
* The line this chart wants to be aligned on, in CSS px from the host's
|
|
571
|
+
* top-left corner. `y` is the x axis (the bottom of the plot frame), `x` the y axis (its left edge), of the first panel when faceted. Empty before the chart has drawn.
|
|
572
|
+
*/
|
|
573
|
+
async getBaseline() {
|
|
574
|
+
return readChartBaseline(this.element, "bn-chart-scatter-renderer");
|
|
575
|
+
}
|
|
569
576
|
/**
|
|
570
577
|
* Lazily generates this chart's layout state: host box (context- and
|
|
571
578
|
* component-relative, CSS px), the canvas region, point count and
|
|
@@ -664,7 +671,7 @@ export class ChartScatter {
|
|
|
664
671
|
return (h("bn-chart-scatter-renderer", { tableName: this.datasetName, dataVersion: this.dataVersion, chartTitle: this.chartTitle, x: x, y: y, iso: this.prepareIso(), labels: this.prepareLabels(), legend: this.prepareLegend(), facet: facet, pointLevel: pointLevel, seriesLevel: this.prepareSeriesLevel(pointLevel), aspect: this.prepareAspect(), limit: this.prepareLimit(), filter: this.filter, styles: preparedStyle, i18n: preparedI18n, containerWidth: fullParentWidth, ruleSetConfig: this.ruleSetConfig(), errors: this.errors, translator: this.translateForInner }));
|
|
665
672
|
}
|
|
666
673
|
render() {
|
|
667
|
-
return (h(Host, { key: '
|
|
674
|
+
return (h(Host, { key: '4947af836a9c76b089bc07fb1f4df8c248aa4f62', style: this.getFontStyles() }, h("div", { key: '16abbc30d255d224aefecf9e337d3b23d449828a', class: "container" }, this.chartTemplate())));
|
|
668
675
|
}
|
|
669
676
|
static get is() { return "bn-chart-scatter"; }
|
|
670
677
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1025,6 +1032,29 @@ export class ChartScatter {
|
|
|
1025
1032
|
}
|
|
1026
1033
|
static get methods() {
|
|
1027
1034
|
return {
|
|
1035
|
+
"getBaseline": {
|
|
1036
|
+
"complexType": {
|
|
1037
|
+
"signature": "() => Promise<Baseline>",
|
|
1038
|
+
"parameters": [],
|
|
1039
|
+
"references": {
|
|
1040
|
+
"Promise": {
|
|
1041
|
+
"location": "global",
|
|
1042
|
+
"id": "global::Promise"
|
|
1043
|
+
},
|
|
1044
|
+
"Baseline": {
|
|
1045
|
+
"location": "import",
|
|
1046
|
+
"path": "../../utils/layoutState",
|
|
1047
|
+
"id": "src/utils/layoutState/index.ts::Baseline",
|
|
1048
|
+
"referenceLocation": "Baseline"
|
|
1049
|
+
}
|
|
1050
|
+
},
|
|
1051
|
+
"return": "Promise<Baseline>"
|
|
1052
|
+
},
|
|
1053
|
+
"docs": {
|
|
1054
|
+
"text": "The line this chart wants to be aligned on, in CSS px from the host's\ntop-left corner. `y` is the x axis (the bottom of the plot frame), `x` the y axis (its left edge), of the first panel when faceted. Empty before the chart has drawn.",
|
|
1055
|
+
"tags": []
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1028
1058
|
"getLayoutState": {
|
|
1029
1059
|
"complexType": {
|
|
1030
1060
|
"signature": "(options?: LayoutStateOptions) => Promise<ComponentLayoutState>",
|
|
@@ -93,7 +93,7 @@ export class BnChartStructureRenderer {
|
|
|
93
93
|
const errorMsg = (_a = this.i18n.get("no-data")) !== null && _a !== void 0 ? _a : "No Data";
|
|
94
94
|
return (h(Host, { class: "no-data" }, h("div", { class: "empty-state" }, errorMsg)));
|
|
95
95
|
}
|
|
96
|
-
return (h(Host, null, h("div", { innerHTML: (_b = this.pattern) === null || _b === void 0 ? void 0 : _b.toString(), class: "hidePatternContainer" }), h("div", { class: this.showMeasureScale ? "footer" : "footer-hide" }, (_c = this.chart) === null || _c === void 0 ? void 0 : _c.getFooter()), h("div", { innerHTML: (_d = this.chart) === null || _d === void 0 ? void 0 : _d.toString() })));
|
|
96
|
+
return (h(Host, null, h("div", { innerHTML: (_b = this.pattern) === null || _b === void 0 ? void 0 : _b.toString(), class: "hidePatternContainer", style: { width: "0", height: "0", overflow: "hidden" } }), h("div", { class: this.showMeasureScale ? "footer" : "footer-hide" }, (_c = this.chart) === null || _c === void 0 ? void 0 : _c.getFooter()), h("div", { innerHTML: (_d = this.chart) === null || _d === void 0 ? void 0 : _d.toString() })));
|
|
97
97
|
}
|
|
98
98
|
/** Reports a failed query as the wrapper's `ERR_sql` item. Without it the chart would only show "No Data". */
|
|
99
99
|
syncQueryError() {
|
|
@@ -17,7 +17,7 @@ import { formatScalingValue, parseScaling, resolveScalingValue } from "../../uti
|
|
|
17
17
|
import { observeParentResize } from "../../utils/layoutObserver";
|
|
18
18
|
import { AggregationLevel, StackBy, StackMode, StackOrder } from "../../utils/constants";
|
|
19
19
|
import { OrderColumn, OrderDirection } from "../../utils/model/Order";
|
|
20
|
-
import { LAYOUT_STATE_VERSION, collectChartFacadeLayout, measure, originsFor, readDiagnostics, resolveStandaloneId, } from "../../utils/layoutState";
|
|
20
|
+
import { LAYOUT_STATE_VERSION, collectChartFacadeLayout, measure, originsFor, readDiagnostics, readChartBaseline, resolveStandaloneId, } from "../../utils/layoutState";
|
|
21
21
|
import { syncEmptyState } from "../../utils/emptyState";
|
|
22
22
|
/**
|
|
23
23
|
* SVG structure (categorical) bar chart following IBCS standards.
|
|
@@ -889,6 +889,13 @@ export class Chart {
|
|
|
889
889
|
const effectiveScenarios = (stackConfig === null || stackConfig === void 0 ? void 0 : stackConfig.by) === StackBy.DIMENSIONS ? scenarios.slice(0, 1) : scenarios;
|
|
890
890
|
return (h("bn-chart-structure-renderer", { tableName: this.datasetName, dataVersion: this.dataVersion, chartTitle: this.prepareChartTitle(idx), scenarios: effectiveScenarios, variances: [localScenarioString], hideCategories: this.prepareHideCategories(idx), pixelPerUnit: ppu, pixelPerPercentage: ppp, reportAutoScaling: this.handleAutoScalingReport, errors: this.errors, limit: this.prepareLimit(), styles: this.prepareStyle(), i18n: this.prepareI18n(), order: this.prepareOrder(), level: this.prepareLevel(), filter: this.prepareFilter(), "measure-scale": this.prepareMeasureScale(), "measure-unit": this.prepareMeasureUnit(), showMeasureScale: this.prepareShowMeasureScale(idx), stackConfig: stackConfig, parentDimensions: this.prepareDimension(), ruleSetConfig: this.ruleSetConfig() }));
|
|
891
891
|
}
|
|
892
|
+
/**
|
|
893
|
+
* The line this chart wants to be aligned on, in CSS px from the host's
|
|
894
|
+
* top-left corner. The vertical value axis of the base segment gives `x` and its top end `y`. Empty before the chart has drawn.
|
|
895
|
+
*/
|
|
896
|
+
async getBaseline() {
|
|
897
|
+
return readChartBaseline(this.element, "bn-chart-structure-renderer");
|
|
898
|
+
}
|
|
892
899
|
/**
|
|
893
900
|
* Lazily generates this chart's layout state: host box (context- and
|
|
894
901
|
* component-relative, CSS px), one `canvas:<segment>` region per rendered
|
|
@@ -927,6 +934,7 @@ export class Chart {
|
|
|
927
934
|
},
|
|
928
935
|
diagnostics: readDiagnostics(this.element),
|
|
929
936
|
scaling: this.resolveScalingInfo(fontSizePx),
|
|
937
|
+
baseline: layout.baseline,
|
|
930
938
|
};
|
|
931
939
|
if (layout.elements)
|
|
932
940
|
state.elements = layout.elements;
|
|
@@ -1003,7 +1011,7 @@ export class Chart {
|
|
|
1003
1011
|
scenariosArray = [...scenariosArray, ...variancesArray];
|
|
1004
1012
|
}
|
|
1005
1013
|
const fontStyles = this.getFontStyles();
|
|
1006
|
-
return (h(Host, { key: '
|
|
1014
|
+
return (h(Host, { key: '5018d7c289272f154a10d266210ae62c2ce8448e', style: fontStyles }, h("div", { key: '1229588dbef454c12e715fecf7489fe3a352db81', class: "container" }, scenariosArray.map(this.chartTemplate))));
|
|
1007
1015
|
}
|
|
1008
1016
|
static get is() { return "bn-chart-structure"; }
|
|
1009
1017
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1500,6 +1508,29 @@ export class Chart {
|
|
|
1500
1508
|
}
|
|
1501
1509
|
static get methods() {
|
|
1502
1510
|
return {
|
|
1511
|
+
"getBaseline": {
|
|
1512
|
+
"complexType": {
|
|
1513
|
+
"signature": "() => Promise<Baseline>",
|
|
1514
|
+
"parameters": [],
|
|
1515
|
+
"references": {
|
|
1516
|
+
"Promise": {
|
|
1517
|
+
"location": "global",
|
|
1518
|
+
"id": "global::Promise"
|
|
1519
|
+
},
|
|
1520
|
+
"Baseline": {
|
|
1521
|
+
"location": "import",
|
|
1522
|
+
"path": "../../utils/layoutState",
|
|
1523
|
+
"id": "src/utils/layoutState/index.ts::Baseline",
|
|
1524
|
+
"referenceLocation": "Baseline"
|
|
1525
|
+
}
|
|
1526
|
+
},
|
|
1527
|
+
"return": "Promise<Baseline>"
|
|
1528
|
+
},
|
|
1529
|
+
"docs": {
|
|
1530
|
+
"text": "The line this chart wants to be aligned on, in CSS px from the host's\ntop-left corner. The vertical value axis of the base segment gives `x` and its top end `y`. Empty before the chart has drawn.",
|
|
1531
|
+
"tags": []
|
|
1532
|
+
}
|
|
1533
|
+
},
|
|
1503
1534
|
"getLayoutState": {
|
|
1504
1535
|
"complexType": {
|
|
1505
1536
|
"signature": "(options?: LayoutStateOptions) => Promise<ComponentLayoutState>",
|
package/dist/collection/components/bn-chart-time/bn-chart-time-renderer/bn-chart-time-renderer.js
CHANGED
|
@@ -95,7 +95,7 @@ export class BnChartTimeRenderer {
|
|
|
95
95
|
const errorMsg = (_a = this.i18n.get("no-data")) !== null && _a !== void 0 ? _a : "No Data";
|
|
96
96
|
return (h(Host, { class: "no-data" }, h("div", { class: "empty-state" }, errorMsg)));
|
|
97
97
|
}
|
|
98
|
-
return (h(Host, null, h("div", { innerHTML: (_b = this.pattern) === null || _b === void 0 ? void 0 : _b.toString(), class: "hidePatternContainer" }), h("div", { class: this.showMeasureScale ? "footer" : "footer-hide" }, (_c = this.chart) === null || _c === void 0 ? void 0 : _c.getFooter()), h("div", { innerHTML: (_d = this.chart) === null || _d === void 0 ? void 0 : _d.toString() })));
|
|
98
|
+
return (h(Host, null, h("div", { innerHTML: (_b = this.pattern) === null || _b === void 0 ? void 0 : _b.toString(), class: "hidePatternContainer", style: { width: "0", height: "0", overflow: "hidden" } }), h("div", { class: this.showMeasureScale ? "footer" : "footer-hide" }, (_c = this.chart) === null || _c === void 0 ? void 0 : _c.getFooter()), h("div", { innerHTML: (_d = this.chart) === null || _d === void 0 ? void 0 : _d.toString() })));
|
|
99
99
|
}
|
|
100
100
|
/** Reports a failed query as the wrapper's `ERR_sql` item. Without it the chart would only show "No Data". */
|
|
101
101
|
syncQueryError() {
|
|
@@ -19,7 +19,7 @@ import { VarianceScenario } from "../../utils/model/VarianceScenario";
|
|
|
19
19
|
import { Formatter } from "../../utils/formatter";
|
|
20
20
|
import { AxisLabelsMode, ChartMode, StackBy, StackMode, StackOrder } from "../../utils/constants";
|
|
21
21
|
import { DateDistance } from "../../utils/DateStringFactory";
|
|
22
|
-
import { LAYOUT_STATE_VERSION, collectChartFacadeLayout, measure, originsFor, readDiagnostics, resolveStandaloneId, } from "../../utils/layoutState";
|
|
22
|
+
import { LAYOUT_STATE_VERSION, collectChartFacadeLayout, measure, originsFor, readDiagnostics, readChartBaseline, resolveStandaloneId, } from "../../utils/layoutState";
|
|
23
23
|
import { syncEmptyState } from "../../utils/emptyState";
|
|
24
24
|
/**
|
|
25
25
|
* SVG time-series chart following IBCS standards.
|
|
@@ -1027,6 +1027,13 @@ export class Chart {
|
|
|
1027
1027
|
const effectiveScenarios = (stackConfig === null || stackConfig === void 0 ? void 0 : stackConfig.by) === StackBy.DIMENSIONS ? scenarios.slice(0, 1) : scenarios;
|
|
1028
1028
|
return (h("bn-chart-time-renderer", { tableName: this.datasetName, dataVersion: this.dataVersion, chartTitle: this.prepareChartTitle(idx), scenarios: effectiveScenarios, variances: [localScenarioString], hideAxisLabels: this.prepareHideAxisLabels(idx), pixelPerUnit: ppu, pixelPerPercentage: ppp, reportAutoScaling: this.handleAutoScalingReport, errors: this.errors, leftSideOffsetForHorizontalSync: this.prepareLeftSideOffset(preparedI18n, preparedStyle), styles: preparedStyle, i18n: preparedI18n, dateInterval: this.prepareDateInterval(), intervalSpanLimit: this.prepareIntervalSpanLimit(), axisLabelsMode: this.prepareAxisLabelsMode(), filter: this.prepareFilter(), "measure-scale": this.prepareMeasureScale(), "measure-unit": this.prepareMeasureUnit(), showOverlayAvg: this.prepareAvg(), showOverlayMedian: this.prepareMedian(), showMeasureScale: this.prepareShowMeasureScale(idx), chartMode: this.prepareChartMode(), maxBars: this.prepareMaxBars(), stackConfig: stackConfig, lineFullWidth: this.prepareLineFullWidth(), containerWidth: fullParentWidth, parentDimensions: this.prepareDimension(), ruleSetConfig: this.ruleSetConfig() }));
|
|
1029
1029
|
}
|
|
1030
|
+
/**
|
|
1031
|
+
* The line this chart wants to be aligned on, in CSS px from the host's
|
|
1032
|
+
* top-left corner. A horizontal axis line gives `y` and its left end `x`. The category axis of the base segment sits at zero, so negative bars hang below it. Empty before the chart has drawn.
|
|
1033
|
+
*/
|
|
1034
|
+
async getBaseline() {
|
|
1035
|
+
return readChartBaseline(this.element, "bn-chart-time-renderer");
|
|
1036
|
+
}
|
|
1030
1037
|
/**
|
|
1031
1038
|
* Lazily generates this chart's layout state: host box (context- and
|
|
1032
1039
|
* component-relative, CSS px), one `canvas:<segment>` region per rendered
|
|
@@ -1066,6 +1073,7 @@ export class Chart {
|
|
|
1066
1073
|
},
|
|
1067
1074
|
diagnostics: readDiagnostics(this.element),
|
|
1068
1075
|
scaling: this.resolveScalingInfo(fontSizePx),
|
|
1076
|
+
baseline: layout.baseline,
|
|
1069
1077
|
};
|
|
1070
1078
|
if (layout.elements)
|
|
1071
1079
|
state.elements = layout.elements;
|
|
@@ -1143,7 +1151,7 @@ export class Chart {
|
|
|
1143
1151
|
scenariosArray = [...scenariosArray, ...variancesArray];
|
|
1144
1152
|
}
|
|
1145
1153
|
const fontStyles = this.getFontStyles();
|
|
1146
|
-
return (h(Host, { key: '
|
|
1154
|
+
return (h(Host, { key: '959245cc54fe058c46e1c2ae07c454b52cf280bc', style: fontStyles }, h("div", { key: '8c2d94dd9192696388f2137a055aff013abfe0db', class: "container" }, scenariosArray.map(this.chartTemplate))));
|
|
1147
1155
|
}
|
|
1148
1156
|
static get is() { return "bn-chart-time"; }
|
|
1149
1157
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1684,6 +1692,29 @@ export class Chart {
|
|
|
1684
1692
|
}
|
|
1685
1693
|
static get methods() {
|
|
1686
1694
|
return {
|
|
1695
|
+
"getBaseline": {
|
|
1696
|
+
"complexType": {
|
|
1697
|
+
"signature": "() => Promise<Baseline>",
|
|
1698
|
+
"parameters": [],
|
|
1699
|
+
"references": {
|
|
1700
|
+
"Promise": {
|
|
1701
|
+
"location": "global",
|
|
1702
|
+
"id": "global::Promise"
|
|
1703
|
+
},
|
|
1704
|
+
"Baseline": {
|
|
1705
|
+
"location": "import",
|
|
1706
|
+
"path": "../../utils/layoutState",
|
|
1707
|
+
"id": "src/utils/layoutState/index.ts::Baseline",
|
|
1708
|
+
"referenceLocation": "Baseline"
|
|
1709
|
+
}
|
|
1710
|
+
},
|
|
1711
|
+
"return": "Promise<Baseline>"
|
|
1712
|
+
},
|
|
1713
|
+
"docs": {
|
|
1714
|
+
"text": "The line this chart wants to be aligned on, in CSS px from the host's\ntop-left corner. A horizontal axis line gives `y` and its left end `x`. The category axis of the base segment sits at zero, so negative bars hang below it. Empty before the chart has drawn.",
|
|
1715
|
+
"tags": []
|
|
1716
|
+
}
|
|
1717
|
+
},
|
|
1687
1718
|
"getLayoutState": {
|
|
1688
1719
|
"complexType": {
|
|
1689
1720
|
"signature": "(options?: LayoutStateOptions) => Promise<ComponentLayoutState>",
|