@opendata-ai/openchart-vanilla 2.13.1 → 6.0.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/index.js CHANGED
@@ -3251,7 +3251,11 @@ function applyTextStyle(el, style) {
3251
3251
  el.setAttribute("text-anchor", style.textAnchor);
3252
3252
  }
3253
3253
  if (style.dominantBaseline) {
3254
- el.setAttribute("dominant-baseline", style.dominantBaseline);
3254
+ if (style.dominantBaseline === "hanging") {
3255
+ el.setAttribute("dy", `${style.fontSize * 0.8}px`);
3256
+ } else {
3257
+ el.setAttribute("dominant-baseline", style.dominantBaseline);
3258
+ }
3255
3259
  }
3256
3260
  if (style.fontVariant) {
3257
3261
  el.setAttribute("font-variant", style.fontVariant);
@@ -3974,10 +3978,10 @@ function renderBrand(parent, layout) {
3974
3978
  setAttrs(text, {
3975
3979
  x: rightEdge,
3976
3980
  y: chromeY,
3981
+ dy: BRAND_FONT_SIZE * 0.8,
3977
3982
  "font-family": layout.theme.fonts.family,
3978
3983
  "font-size": BRAND_FONT_SIZE,
3979
3984
  "text-anchor": "end",
3980
- "dominant-baseline": "hanging",
3981
3985
  "fill-opacity": 0.55
3982
3986
  });
3983
3987
  text.style.setProperty("fill", fill);