@opendata-ai/openchart-engine 7.6.0 → 7.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/compile-layer.test.ts +94 -0
- package/src/compile/layer.ts +11 -1
- package/src/compile.ts +3 -1
package/dist/index.js
CHANGED
|
@@ -10976,8 +10976,14 @@ function compileLayer(spec, options, compileChart2) {
|
|
|
10976
10976
|
zIndex: leaf.zIndex ?? i
|
|
10977
10977
|
}));
|
|
10978
10978
|
indexedLeaves.sort((a, b) => a.zIndex - b.zIndex);
|
|
10979
|
+
const leafOptions = { ...options, frozenChartArea: primaryLayout.area };
|
|
10979
10980
|
for (const { leaf } of indexedLeaves) {
|
|
10980
|
-
const
|
|
10981
|
+
const themedLeaf = {
|
|
10982
|
+
...leaf,
|
|
10983
|
+
theme: leaf.theme ?? spec.theme,
|
|
10984
|
+
darkMode: leaf.darkMode ?? spec.darkMode
|
|
10985
|
+
};
|
|
10986
|
+
const leafLayout = compileChart2(themedLeaf, leafOptions);
|
|
10981
10987
|
allMarks.push(...leafLayout.marks);
|
|
10982
10988
|
const leafLeg = leafLayout.legend;
|
|
10983
10989
|
if ("entries" in leafLeg) {
|
|
@@ -15564,7 +15570,7 @@ function compileChart(spec, options) {
|
|
|
15564
15570
|
plan.xAxisExtent
|
|
15565
15571
|
);
|
|
15566
15572
|
const dims = computeDimensions(chartSpec, options, legendStub, theme, strategy, watermark, plan);
|
|
15567
|
-
const chartArea = dims.chartArea;
|
|
15573
|
+
const chartArea = options.frozenChartArea ?? dims.chartArea;
|
|
15568
15574
|
const finalLegend = placeLegend(
|
|
15569
15575
|
plan.legendContent,
|
|
15570
15576
|
chartArea,
|