@opendata-ai/openchart-vanilla 8.2.2 → 8.3.0
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/{chunk-ZKASH7AX.js → chunk-737VNBU6.js} +2 -2
- package/dist/{chunk-2CEKMIJH.js → chunk-P32LUJFK.js} +8 -31
- package/dist/{chunk-2CEKMIJH.js.map → chunk-P32LUJFK.js.map} +1 -1
- package/dist/{chunk-BKN4R3J6.js → chunk-PEIX32S3.js} +11 -14
- package/dist/chunk-PEIX32S3.js.map +1 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.js +7 -17
- package/dist/index.js.map +1 -1
- package/dist/{mount-Djb1VvKO.d.ts → mount-Bs8nFSf1.d.ts} +1 -1
- package/dist/static.js +2 -2
- package/dist/story/index.d.ts +2 -2
- package/dist/story/index.js +2 -2
- package/dist/styles.css.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-BKN4R3J6.js.map +0 -1
- /package/dist/{chunk-ZKASH7AX.js.map → chunk-737VNBU6.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
renderChromeElement,
|
|
4
4
|
renderLegend,
|
|
5
5
|
stampAnimationVars
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-P32LUJFK.js";
|
|
7
7
|
|
|
8
8
|
// src/tilemap-renderer.ts
|
|
9
9
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
@@ -295,4 +295,4 @@ function renderTileMapSVG(layout, opts) {
|
|
|
295
295
|
export {
|
|
296
296
|
renderTileMapSVG
|
|
297
297
|
};
|
|
298
|
-
//# sourceMappingURL=chunk-
|
|
298
|
+
//# sourceMappingURL=chunk-737VNBU6.js.map
|
|
@@ -1100,11 +1100,10 @@ function renderAxes(parent, layout, opts) {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
|
|
1102
1102
|
// src/renderers/brand.ts
|
|
1103
|
-
import {
|
|
1103
|
+
import { BRAND_MIN_WIDTH, textAscent as textAscent3 } from "@opendata-ai/openchart-core";
|
|
1104
1104
|
|
|
1105
1105
|
// src/renderers/chrome.ts
|
|
1106
1106
|
import {
|
|
1107
|
-
estimateTextWidth as estimateTextWidth2,
|
|
1108
1107
|
FOOTNOTE_LINE_HEIGHT,
|
|
1109
1108
|
footnoteBandHeight as footnoteBandHeightFor,
|
|
1110
1109
|
textAscent as textAscent2,
|
|
@@ -1240,17 +1239,6 @@ function renderChrome(parent, layout) {
|
|
|
1240
1239
|
if (chrome.brand) {
|
|
1241
1240
|
const brandY = bottomOffset + chrome.brand.y + bandHeight;
|
|
1242
1241
|
renderChromeElement(g, { ...chrome.brand, y: brandY }, "oc-brand", "brand", measureText);
|
|
1243
|
-
const textWidth = estimateTextWidth2(
|
|
1244
|
-
chrome.brand.text,
|
|
1245
|
-
chrome.brand.style.fontSize,
|
|
1246
|
-
chrome.brand.style.fontWeight
|
|
1247
|
-
);
|
|
1248
|
-
const dotX = chrome.brand.x - textWidth - 12;
|
|
1249
|
-
const dotY = brandY + chrome.brand.style.fontSize / 2;
|
|
1250
|
-
const dot = createSVGElement("circle");
|
|
1251
|
-
dot.setAttribute("class", "oc-brand-dot");
|
|
1252
|
-
setAttrs(dot, { cx: dotX, cy: dotY, r: 3 });
|
|
1253
|
-
g.appendChild(dot);
|
|
1254
1242
|
}
|
|
1255
1243
|
parent.appendChild(g);
|
|
1256
1244
|
}
|
|
@@ -1282,24 +1270,13 @@ function renderBrand(parent, layout) {
|
|
|
1282
1270
|
x: rightEdge,
|
|
1283
1271
|
y: chromeY + textAscent3(BRAND_LARGE),
|
|
1284
1272
|
"font-family": layout.theme.fonts.family,
|
|
1285
|
-
"font-size":
|
|
1273
|
+
"font-size": BRAND_LARGE,
|
|
1274
|
+
"font-weight": "600",
|
|
1286
1275
|
"text-anchor": "end",
|
|
1287
1276
|
"fill-opacity": 0.55
|
|
1288
1277
|
});
|
|
1289
1278
|
text.style.setProperty("fill", fill);
|
|
1290
|
-
|
|
1291
|
-
trySpan.setAttribute("font-weight", "500");
|
|
1292
|
-
trySpan.textContent = "try";
|
|
1293
|
-
text.appendChild(trySpan);
|
|
1294
|
-
const openDataSpan = createSVGElement("tspan");
|
|
1295
|
-
openDataSpan.setAttribute("font-weight", "600");
|
|
1296
|
-
openDataSpan.setAttribute("font-size", String(BRAND_LARGE));
|
|
1297
|
-
openDataSpan.textContent = "OpenData";
|
|
1298
|
-
text.appendChild(openDataSpan);
|
|
1299
|
-
const aiSpan = createSVGElement("tspan");
|
|
1300
|
-
aiSpan.setAttribute("font-weight", "500");
|
|
1301
|
-
aiSpan.textContent = ".ai";
|
|
1302
|
-
text.appendChild(aiSpan);
|
|
1279
|
+
text.textContent = "OpenData";
|
|
1303
1280
|
a.appendChild(text);
|
|
1304
1281
|
parent.appendChild(a);
|
|
1305
1282
|
}
|
|
@@ -1408,7 +1385,7 @@ function renderEndpointLabels(parent, layout) {
|
|
|
1408
1385
|
}
|
|
1409
1386
|
|
|
1410
1387
|
// src/renderers/legend.ts
|
|
1411
|
-
import { estimateTextWidth as
|
|
1388
|
+
import { estimateTextWidth as estimateTextWidth2 } from "@opendata-ai/openchart-core";
|
|
1412
1389
|
function isCategorical(legend) {
|
|
1413
1390
|
return !legend.type || legend.type === "categorical";
|
|
1414
1391
|
}
|
|
@@ -1547,7 +1524,7 @@ function renderLegend(parent, legend) {
|
|
|
1547
1524
|
offsetX = pos.x;
|
|
1548
1525
|
offsetY = pos.y;
|
|
1549
1526
|
} else if (isHorizontal && i > 0) {
|
|
1550
|
-
const labelWidth =
|
|
1527
|
+
const labelWidth = estimateTextWidth2(
|
|
1551
1528
|
entry.label,
|
|
1552
1529
|
legend.labelStyle.fontSize,
|
|
1553
1530
|
legend.labelStyle.fontWeight
|
|
@@ -1629,7 +1606,7 @@ function renderLegend(parent, legend) {
|
|
|
1629
1606
|
g.appendChild(entryG);
|
|
1630
1607
|
if (!pos) {
|
|
1631
1608
|
if (isHorizontal) {
|
|
1632
|
-
const labelWidth =
|
|
1609
|
+
const labelWidth = estimateTextWidth2(
|
|
1633
1610
|
entry.label,
|
|
1634
1611
|
legend.labelStyle.fontSize,
|
|
1635
1612
|
legend.labelStyle.fontWeight
|
|
@@ -1964,4 +1941,4 @@ export {
|
|
|
1964
1941
|
renderSingleMark,
|
|
1965
1942
|
renderChartSVG
|
|
1966
1943
|
};
|
|
1967
|
-
//# sourceMappingURL=chunk-
|
|
1944
|
+
//# sourceMappingURL=chunk-P32LUJFK.js.map
|