@opendata-ai/openchart-engine 9.8.0 → 9.8.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 +4 -15
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -9975,17 +9975,6 @@ function applyDomainEnds(fitted, scale) {
|
|
|
9975
9975
|
function* fieldIterable(data, field) {
|
|
9976
9976
|
for (const d of data) yield d[field];
|
|
9977
9977
|
}
|
|
9978
|
-
function chromeToInput(chrome) {
|
|
9979
|
-
return {
|
|
9980
|
-
eyebrow: chrome.eyebrow,
|
|
9981
|
-
title: chrome.title,
|
|
9982
|
-
subtitle: chrome.subtitle,
|
|
9983
|
-
source: chrome.source,
|
|
9984
|
-
byline: chrome.byline,
|
|
9985
|
-
footer: chrome.footer,
|
|
9986
|
-
brand: chrome.brand
|
|
9987
|
-
};
|
|
9988
|
-
}
|
|
9989
9978
|
function scalePadding(basePadding, width, height) {
|
|
9990
9979
|
const minDim = Math.min(width, height);
|
|
9991
9980
|
if (minDim >= 500) return basePadding;
|
|
@@ -13601,7 +13590,7 @@ function resolveLayoutPlan(chartSpec, renderSpec, options, theme, strategy, wate
|
|
|
13601
13590
|
);
|
|
13602
13591
|
const bottomLegendReservation = hasLegendContent(legendContent) && legendContent.position === "bottom" ? legendContent.height + legendGap(width) : 0;
|
|
13603
13592
|
const chrome = computeChrome(
|
|
13604
|
-
|
|
13593
|
+
renderSpec.chrome,
|
|
13605
13594
|
theme,
|
|
13606
13595
|
width,
|
|
13607
13596
|
options.measureText,
|
|
@@ -13762,7 +13751,7 @@ function resolveLayoutPlan(chartSpec, renderSpec, options, theme, strategy, wate
|
|
|
13762
13751
|
);
|
|
13763
13752
|
const bottomLegendReservation = hasLegendContent(legendContent) && legendContent.position === "bottom" ? legendContent.height + legendGap(width) : 0;
|
|
13764
13753
|
let chrome = computeChrome(
|
|
13765
|
-
|
|
13754
|
+
renderSpec.chrome,
|
|
13766
13755
|
theme,
|
|
13767
13756
|
width,
|
|
13768
13757
|
options.measureText,
|
|
@@ -13992,7 +13981,7 @@ function resolveLayoutPlan(chartSpec, renderSpec, options, theme, strategy, wate
|
|
|
13992
13981
|
);
|
|
13993
13982
|
const bottomReserve = hasLegendContent(legendContent) && legendContent.position === "bottom" ? legendContent.height + legendGap(width) : 0;
|
|
13994
13983
|
chrome = computeChrome(
|
|
13995
|
-
|
|
13984
|
+
renderSpec.chrome,
|
|
13996
13985
|
theme,
|
|
13997
13986
|
width,
|
|
13998
13987
|
options.measureText,
|
|
@@ -14265,7 +14254,7 @@ function resolveFigureBudget(spec, options, legendLayout, theme, strategy, water
|
|
|
14265
14254
|
if ((preliminary.width < MIN_CHART_WIDTH || preliminary.height < MIN_CHART_HEIGHT2 || chromeEatsPlot) && chromeMode !== "hidden") {
|
|
14266
14255
|
const fallbackMode = chromeMode === "full" ? "compact" : "hidden";
|
|
14267
14256
|
const fallbackChrome = computeChrome2(
|
|
14268
|
-
|
|
14257
|
+
spec.chrome,
|
|
14269
14258
|
theme,
|
|
14270
14259
|
width,
|
|
14271
14260
|
options.measureText,
|