@oliasoft-open-source/charts-library 5.9.0-beta-1 → 5.9.0-beta-2

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.
Files changed (26) hide show
  1. package/dist/assets/{Color-6BZIO3FS-CmhoIRR3.js → Color-6BZIO3FS-BdmyW5fF.js} +1 -1
  2. package/dist/assets/{DocsRenderer-LL677BLK-D-z3K9l-.js → DocsRenderer-LL677BLK-Dmh2MbD-.js} +4 -4
  3. package/dist/assets/{WithTooltip-65CFNBJE-BuWPqs9e.js → WithTooltip-65CFNBJE-B1vNinkY.js} +1 -1
  4. package/dist/assets/{bar-chart.stories-DpO6wsZ7.js → bar-chart.stories-Ch0i7N0G.js} +1 -1
  5. package/dist/assets/{chunk-YKABRMAI-B1vnVt6R.js → chunk-YKABRMAI-nN4IfCIz.js} +1 -1
  6. package/dist/assets/{components-z8NZ0Kvw.js → components-s5a1V3CD.js} +4 -4
  7. package/dist/assets/formatter-EIJCOSYU-Bo0DMj3p.js +1 -0
  8. package/dist/assets/{get-draggableData-ylXaB6q9.js → get-draggableData-mCkevOrC.js} +1 -1
  9. package/dist/assets/{iframe-Bi6WLX9H.js → iframe-B7buKd6W.js} +3 -3
  10. package/dist/assets/{legend-uQ084jKt.js → legend-Cem_14IV.js} +1 -1
  11. package/dist/assets/{legend-context-BtWRLDaH.js → legend-context-D1oEf-Th.js} +2 -2
  12. package/dist/assets/{line-chart-DCFghsDm.js → line-chart-BDauhYk8.js} +1 -1
  13. package/dist/assets/{line-chart.stories-CCs6790G.js → line-chart.stories-T04m8x5t.js} +1 -1
  14. package/dist/assets/{line-chart.test-case.stories-C5ynxvy0.js → line-chart.test-case.stories-BcA_QlE1.js} +1 -1
  15. package/dist/assets/{pie-chart.stories-JD8YUf2H.js → pie-chart.stories-D2G6WnUw.js} +1 -1
  16. package/dist/assets/{react-18-DMnEgq9E.js → react-18-DQODWq5X.js} +1 -1
  17. package/dist/assets/{react-CE5jLosF.js → react-CwUuogrH.js} +1 -1
  18. package/dist/assets/{react-dom-DOIjQDPm.js → react-dom-O1LTTn3X.js} +1 -1
  19. package/dist/assets/{scatter-chart.stories-CpuFiR5B.js → scatter-chart.stories-DJ3Z3dsB.js} +1 -1
  20. package/dist/assets/{syntaxhighlighter-ED5Y7EFY-Cmr1QuFp.js → syntaxhighlighter-ED5Y7EFY-DYFKPQ-I.js} +1 -1
  21. package/dist/assets/{theming-DxqRh7ol.js → theming-DpsViFyv.js} +1 -1
  22. package/dist/iframe.html +1 -1
  23. package/dist/index.js +9 -7
  24. package/dist/project.json +1 -1
  25. package/package.json +1 -1
  26. package/dist/assets/formatter-EIJCOSYU-Bvf14B6E.js +0 -1
package/dist/iframe.html CHANGED
@@ -547,7 +547,7 @@
547
547
  }
548
548
  </script>
549
549
 
550
- <script type="module" crossorigin src="./assets/iframe-Bi6WLX9H.js"></script>
550
+ <script type="module" crossorigin src="./assets/iframe-B7buKd6W.js"></script>
551
551
  <link rel="modulepreload" crossorigin href="./assets/preload-helper-Bhb7V-Yo.js">
552
552
 
553
553
  </head>
package/dist/index.js CHANGED
@@ -19604,7 +19604,7 @@ const buildLikelyOverlapSet = (annotationsData) => {
19604
19604
  y: getAnchorValueFromData(ann, "y"),
19605
19605
  label: ann?.label,
19606
19606
  visible: ann?.display !== false
19607
- })).filter((p) => p.visible && !!p.label && typeof p.x === "number" && typeof p.y === "number");
19607
+ })).filter((p) => p.visible && !!p.label && isFiniteNumber$1(p.y));
19608
19608
  if (!points.length) return /* @__PURE__ */ new Set();
19609
19609
  const ys = points.map((p) => p.y);
19610
19610
  const rangeY = Math.max(...ys) - Math.min(...ys);
@@ -19615,7 +19615,8 @@ const buildLikelyOverlapSet = (annotationsData) => {
19615
19615
  const a = points[i];
19616
19616
  const b = points[j];
19617
19617
  if (!(a.side === "center" || b.side === "center" || a.side === b.side)) continue;
19618
- if (Math.abs(a.y - b.y) <= yThreshold && Math.abs(a.x - b.x) <= xThreshold) {
19618
+ const xClose = !isFiniteNumber$1(a.x) || !isFiniteNumber$1(b.x) ? true : Math.abs(a.x - b.x) <= xThreshold;
19619
+ if (Math.abs(a.y - b.y) <= yThreshold && xClose) {
19619
19620
  overlapSet.add(a.idx);
19620
19621
  overlapSet.add(b.idx);
19621
19622
  }
@@ -19686,9 +19687,9 @@ const hasOverlappingLabel = (ctx, refAnnotation, index, annotationsData) => {
19686
19687
  if (!area) return false;
19687
19688
  const yVal = getAnchorValueFromData(refAnnotation, "y");
19688
19689
  const xVal = getAnchorValueFromData(refAnnotation, "x");
19689
- if (!isFiniteNumber$1(yVal) || !isFiniteNumber$1(xVal)) return false;
19690
+ if (!isFiniteNumber$1(yVal)) return false;
19690
19691
  const currentYPx = yScale.getPixelForValue(yVal);
19691
- const currentXPx = xScale.getPixelForValue(xVal);
19692
+ const currentXPx = isFiniteNumber$1(xVal) ? xScale.getPixelForValue(xVal) : void 0;
19692
19693
  const currentSide = getLabelSide(refAnnotation);
19693
19694
  const currentFont = refAnnotation?.labelConfig?.font;
19694
19695
  const currentHeight = parseFontSize(currentFont) + 6;
@@ -19704,13 +19705,14 @@ const hasOverlappingLabel = (ctx, refAnnotation, index, annotationsData) => {
19704
19705
  if (!otherYScale || !otherXScale) continue;
19705
19706
  const otherYVal = getAnchorValueFromData(ann, "y");
19706
19707
  const otherXVal = getAnchorValueFromData(ann, "x");
19707
- if (!isFiniteNumber$1(otherYVal) || !isFiniteNumber$1(otherXVal)) continue;
19708
+ if (!isFiniteNumber$1(otherYVal)) continue;
19708
19709
  const otherYPx = otherYScale.getPixelForValue(otherYVal);
19709
- const otherXPx = otherXScale.getPixelForValue(otherXVal);
19710
+ const otherXPx = isFiniteNumber$1(otherXVal) ? otherXScale.getPixelForValue(otherXVal) : void 0;
19710
19711
  const otherSide = getLabelSide(ann);
19711
19712
  const otherFont = ann?.labelConfig?.font;
19712
19713
  const yThreshold = (currentHeight + (parseFontSize(otherFont) + 6)) / 2;
19713
- if ((currentSide === "center" || otherSide === "center" || currentSide === otherSide) && Math.abs(currentYPx - otherYPx) < yThreshold && Math.abs(currentXPx - otherXPx) < 160) return true;
19714
+ const xClose = !isFiniteNumber$1(currentXPx) || !isFiniteNumber$1(otherXPx) ? true : Math.abs(currentXPx - otherXPx) < 160;
19715
+ if ((currentSide === "center" || otherSide === "center" || currentSide === otherSide) && Math.abs(currentYPx - otherYPx) < yThreshold && xClose) return true;
19714
19716
  }
19715
19717
  return false;
19716
19718
  };
package/dist/project.json CHANGED
@@ -1 +1 @@
1
- {"generatedAt":1773070620716,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"knownPackages":{"testPackages":{"@vitest/coverage-v8":"4.0.18","eslint-plugin-vitest":"0.5.4","eslint-plugin-vitest-globals":"1.5.0","vitest":"4.0.18"},"stylingPackages":{"less":"^4.3.0"}},"hasRouterPackage":false,"packageManager":{"type":"pnpm","version":"10.28.1","agent":"pnpm","nodeLinker":"undefined"},"typescriptOptions":{"reactDocgen":"react-docgen"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","portableStoriesFileCount":0,"applicationFileCount":0,"storybookVersion":"10.2.8","storybookVersionSpecifier":"^10.2.8","language":"javascript","storybookPackages":{"@storybook/react-vite":{"version":"10.2.8"},"@storybook/testing-library":{"version":"0.2.2"},"eslint-plugin-storybook":{"version":"10.2.8"},"storybook":{}},"addons":{"@storybook/addon-themes":{"version":"10.2.8"},"@storybook/addon-docs":{"version":"10.2.8"}},"packageJsonType":"module"}
1
+ {"generatedAt":1773072272815,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"knownPackages":{"testPackages":{"@vitest/coverage-v8":"4.0.18","eslint-plugin-vitest":"0.5.4","eslint-plugin-vitest-globals":"1.5.0","vitest":"4.0.18"},"stylingPackages":{"less":"^4.3.0"}},"hasRouterPackage":false,"packageManager":{"type":"pnpm","version":"10.28.1","agent":"pnpm","nodeLinker":"undefined"},"typescriptOptions":{"reactDocgen":"react-docgen"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","portableStoriesFileCount":0,"applicationFileCount":0,"storybookVersion":"10.2.8","storybookVersionSpecifier":"^10.2.8","language":"javascript","storybookPackages":{"@storybook/react-vite":{"version":"10.2.8"},"@storybook/testing-library":{"version":"0.2.2"},"eslint-plugin-storybook":{"version":"10.2.8"},"storybook":{}},"addons":{"@storybook/addon-themes":{"version":"10.2.8"},"@storybook/addon-docs":{"version":"10.2.8"}},"packageJsonType":"module"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/charts-library",
3
- "version": "5.9.0-beta-1",
3
+ "version": "5.9.0-beta-2",
4
4
  "description": "React Chart Library (based on Chart.js and react-chart-js-2)",
5
5
  "homepage": "https://gitlab.com/oliasoft-open-source/charts-library",
6
6
  "bugs": {
@@ -1 +0,0 @@
1
- import{C as e,l as t,u as n}from"./iframe-Bi6WLX9H.js";var r=(0,e(n(),1).default)(2)(async(e,n)=>e===!1?n:t(n));export{r as formatter};