@opendata-ai/openchart-engine 6.19.0 → 6.19.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
CHANGED
|
@@ -8877,7 +8877,8 @@ function computeLegend(spec, strategy, theme, chartArea, watermark = true) {
|
|
|
8877
8877
|
entryGap: 4
|
|
8878
8878
|
};
|
|
8879
8879
|
}
|
|
8880
|
-
const
|
|
8880
|
+
const reserveBrand = watermark && resolvedPosition === "bottom";
|
|
8881
|
+
const availableWidth = chartArea.width - LEGEND_PADDING * 2 - (reserveBrand ? BRAND_RESERVE_WIDTH : 0);
|
|
8881
8882
|
if (spec.legend?.symbolLimit != null) {
|
|
8882
8883
|
const limit = Math.max(1, spec.legend.symbolLimit);
|
|
8883
8884
|
if (limit < entries.length) {
|
|
@@ -11111,7 +11112,7 @@ function compileChart(spec, options) {
|
|
|
11111
11112
|
}
|
|
11112
11113
|
const breakpoint = getBreakpoint(options.width);
|
|
11113
11114
|
const heightClass = getHeightClass(options.height);
|
|
11114
|
-
|
|
11115
|
+
let strategy = getLayoutStrategy(breakpoint, heightClass);
|
|
11115
11116
|
const rawSpec = expandedSpec;
|
|
11116
11117
|
const overrides = rawSpec.overrides;
|
|
11117
11118
|
if (overrides?.[breakpoint]) {
|
|
@@ -11148,6 +11149,7 @@ function compileChart(spec, options) {
|
|
|
11148
11149
|
...chartSpec,
|
|
11149
11150
|
annotations: bp.annotations
|
|
11150
11151
|
};
|
|
11152
|
+
strategy = { ...strategy, annotationPosition: "inline" };
|
|
11151
11153
|
}
|
|
11152
11154
|
}
|
|
11153
11155
|
const rawAnimationSpec = overrides?.[breakpoint]?.animation ?? rawSpec.animation;
|