@opendata-ai/openchart-vanilla 7.1.3 → 7.1.4
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 +9 -6
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/src/renderers/axes.ts +2 -7
- package/src/table-renderer.ts +15 -5
package/dist/index.js
CHANGED
|
@@ -5259,7 +5259,7 @@ function renderAnnotations(parent, layout) {
|
|
|
5259
5259
|
|
|
5260
5260
|
// src/renderers/axes.ts
|
|
5261
5261
|
import {
|
|
5262
|
-
|
|
5262
|
+
AXIS_TITLE_GAP,
|
|
5263
5263
|
estimateTextWidth as estimateTextWidth2,
|
|
5264
5264
|
getAxisTitleOffset,
|
|
5265
5265
|
TICK_LABEL_OFFSET
|
|
@@ -5474,7 +5474,6 @@ function renderAxis(parent, axis, orientation, layout) {
|
|
|
5474
5474
|
transform: `rotate(90, ${titleX}, ${area.y + area.height / 2})`
|
|
5475
5475
|
});
|
|
5476
5476
|
} else {
|
|
5477
|
-
const AXIS_TITLE_GAP = 8;
|
|
5478
5477
|
const maxTickLabelWidth = axis.ticks.reduce((max, t) => {
|
|
5479
5478
|
const w = estimateTextWidth2(
|
|
5480
5479
|
t.label,
|
|
@@ -5484,7 +5483,7 @@ function renderAxis(parent, axis, orientation, layout) {
|
|
|
5484
5483
|
return Math.max(max, w);
|
|
5485
5484
|
}, 0);
|
|
5486
5485
|
const dynamicOffset = TICK_LABEL_OFFSET + maxTickLabelWidth + AXIS_TITLE_GAP;
|
|
5487
|
-
const titleOffset = Math.max(dynamicOffset,
|
|
5486
|
+
const titleOffset = Math.max(dynamicOffset, getAxisTitleOffset(layout.dimensions.width));
|
|
5488
5487
|
setAttrs2(axisLabel, {
|
|
5489
5488
|
x: area.x - titleOffset,
|
|
5490
5489
|
y: area.y + area.height / 2,
|
|
@@ -8692,9 +8691,11 @@ function renderTable(layout, container, opts) {
|
|
|
8692
8691
|
if (pagination) {
|
|
8693
8692
|
wrapper.appendChild(pagination);
|
|
8694
8693
|
}
|
|
8694
|
+
const footerRow = document.createElement("div");
|
|
8695
|
+
footerRow.className = "oc-table-footer-row";
|
|
8695
8696
|
const footerChrome = renderChromeBlock(layout, "footer");
|
|
8696
8697
|
if (footerChrome) {
|
|
8697
|
-
|
|
8698
|
+
footerRow.appendChild(footerChrome);
|
|
8698
8699
|
}
|
|
8699
8700
|
const liveRegion = document.createElement("div");
|
|
8700
8701
|
liveRegion.className = "oc-table-live-region oc-sr-only";
|
|
@@ -8715,7 +8716,6 @@ function renderTable(layout, container, opts) {
|
|
|
8715
8716
|
const brandColor = theme ? theme.colors.axis : "#999999";
|
|
8716
8717
|
const brand = document.createElement("div");
|
|
8717
8718
|
brand.className = "oc-table-ref";
|
|
8718
|
-
brand.style.cssText = "text-align: right; padding: 4px 8px;";
|
|
8719
8719
|
const brandLink = document.createElement("a");
|
|
8720
8720
|
brandLink.href = BRAND_URL4;
|
|
8721
8721
|
brandLink.target = "_blank";
|
|
@@ -8723,7 +8723,10 @@ function renderTable(layout, container, opts) {
|
|
|
8723
8723
|
brandLink.style.cssText = `font-size: ${BRAND_FONT_SIZE4}px; font-weight: 600; color: ${brandColor}; opacity: 0.55; text-decoration: none; font-family: ${theme ? theme.fonts.family : "sans-serif"};`;
|
|
8724
8724
|
brandLink.textContent = "tryOpenData.ai";
|
|
8725
8725
|
brand.appendChild(brandLink);
|
|
8726
|
-
|
|
8726
|
+
footerRow.appendChild(brand);
|
|
8727
|
+
}
|
|
8728
|
+
if (footerRow.childElementCount > 0) {
|
|
8729
|
+
wrapper.appendChild(footerRow);
|
|
8727
8730
|
}
|
|
8728
8731
|
if (opts?.animate && layout.animation?.enabled) {
|
|
8729
8732
|
const anim = layout.animation;
|