@oliasoft-open-source/charts-library 5.8.0-beta-1 → 5.8.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 (29) hide show
  1. package/dist/assets/{Color-6BZIO3FS-yUBzcx3f.js → Color-6BZIO3FS-BY6KYatN.js} +1 -1
  2. package/dist/assets/{DocsRenderer-LL677BLK-Cv-RiZgp.js → DocsRenderer-LL677BLK-gGVqzmXf.js} +4 -4
  3. package/dist/assets/{WithTooltip-65CFNBJE-D5MURczo.js → WithTooltip-65CFNBJE-Ch1PW1bh.js} +1 -1
  4. package/dist/assets/{bar-chart.stories-Djw9G9WY.js → bar-chart.stories-B4LXU_9C.js} +1 -1
  5. package/dist/assets/{chunk-YKABRMAI-BiEoGPFq.js → chunk-YKABRMAI-DmB7_5QE.js} +1 -1
  6. package/dist/assets/{components-pYTrE2NN.js → components-bN1F3H50.js} +4 -4
  7. package/dist/assets/formatter-EIJCOSYU-C3MpZZqp.js +1 -0
  8. package/dist/assets/{get-draggableData-8RjJz0R1.js → get-draggableData-CvBgArLw.js} +1 -1
  9. package/dist/assets/{iframe-B2fw5Bei.js → iframe-C7BMRDpC.js} +3 -3
  10. package/dist/assets/{legend-Bzoldcm9.js → legend-C5nz-pM5.js} +1 -1
  11. package/dist/assets/legend-context-IlLDo2WS.js +9 -0
  12. package/dist/assets/{line-chart-CAC71aZW.js → line-chart-C4LAdFzu.js} +1 -1
  13. package/dist/assets/{line-chart.stories-BktUzznZ.js → line-chart.stories-DaE2Q5FB.js} +1 -1
  14. package/dist/assets/{line-chart.test-case.stories-OoYj9tVX.js → line-chart.test-case.stories-DYaX5SMr.js} +1 -1
  15. package/dist/assets/{pie-chart.stories-2jQBIUKO.js → pie-chart.stories-BxMgMqK7.js} +1 -1
  16. package/dist/assets/{react-18-KGjvEL53.js → react-18-C3CMmLe3.js} +1 -1
  17. package/dist/assets/{react-dom-BVFy65_E.js → react-dom-BSWruJ_n.js} +1 -1
  18. package/dist/assets/{react-BMTEiBr5.js → react-yk5YDUIt.js} +1 -1
  19. package/dist/assets/{scatter-chart.stories-R4ZiS_uH.js → scatter-chart.stories-DYtG-dNV.js} +1 -1
  20. package/dist/assets/{syntaxhighlighter-ED5Y7EFY-OlsfIhDT.js → syntaxhighlighter-ED5Y7EFY-BYKOC5Jx.js} +1 -1
  21. package/dist/assets/{theming-B7gQRU4z.js → theming-BoM3_jXR.js} +1 -1
  22. package/dist/common/helpers/get-chart-annotation.d.ts +48 -6
  23. package/dist/iframe.html +1 -1
  24. package/dist/index.js +55 -3
  25. package/dist/project.json +1 -1
  26. package/dist/src/components/common/helpers/get-chart-annotation.d.ts +48 -6
  27. package/package.json +1 -1
  28. package/dist/assets/formatter-EIJCOSYU-BdIFWCzD.js +0 -1
  29. package/dist/assets/legend-context-BQsaMMe8.js +0 -9
@@ -15,12 +15,6 @@ export declare const generateAnn: (ann: ICommonAnnotationsData, index: number) =
15
15
  id: string;
16
16
  scaleID: "x" | "y";
17
17
  label: {
18
- content: string;
19
- display: boolean;
20
- font: {
21
- weight: string;
22
- };
23
- } | {
24
18
  backgroundColor: string;
25
19
  content: string;
26
20
  display: boolean;
@@ -42,6 +36,54 @@ export declare const generateAnn: (ann: ICommonAnnotationsData, index: number) =
42
36
  padding: number;
43
37
  borderRadius: number;
44
38
  borderColor: any;
39
+ } | {
40
+ position: {
41
+ x: string;
42
+ y: string;
43
+ } | undefined;
44
+ content: string;
45
+ display: boolean;
46
+ font: {
47
+ weight: string;
48
+ };
49
+ backgroundColor?: undefined;
50
+ color?: undefined;
51
+ borderWidth?: undefined;
52
+ padding?: undefined;
53
+ borderRadius?: undefined;
54
+ borderColor?: undefined;
55
+ } | {
56
+ position: {
57
+ x: string;
58
+ y: string;
59
+ } | undefined;
60
+ content: string;
61
+ display: boolean;
62
+ font: {
63
+ weight: string;
64
+ };
65
+ backgroundColor?: undefined;
66
+ color?: undefined;
67
+ borderWidth?: undefined;
68
+ padding?: undefined;
69
+ borderRadius?: undefined;
70
+ borderColor?: undefined;
71
+ } | {
72
+ position: {
73
+ x: string;
74
+ y: string;
75
+ } | undefined;
76
+ content: string;
77
+ display: boolean;
78
+ font: {
79
+ weight: string;
80
+ };
81
+ backgroundColor?: undefined;
82
+ color?: undefined;
83
+ borderWidth?: undefined;
84
+ padding?: undefined;
85
+ borderRadius?: undefined;
86
+ borderColor?: undefined;
45
87
  };
46
88
  backgroundColor: string;
47
89
  borderColor: string;
package/dist/iframe.html CHANGED
@@ -547,7 +547,7 @@
547
547
  }
548
548
  </script>
549
549
 
550
- <script type="module" crossorigin src="./assets/iframe-B2fw5Bei.js"></script>
550
+ <script type="module" crossorigin src="./assets/iframe-C7BMRDpC.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
@@ -19516,6 +19516,43 @@ const getChartFromCtx = (ctx) => {
19516
19516
  if (ctx.$context?.chart?.persistenceId !== void 0) return ctx.$context.chart;
19517
19517
  return ctx.chart?.chart ?? ctx.chart ?? ctx.$context?.chart;
19518
19518
  };
19519
+ var mapToBoxLikeLabelPosition = (position) => {
19520
+ switch (position) {
19521
+ case Position.Top: return {
19522
+ x: "center",
19523
+ y: "start"
19524
+ };
19525
+ case Position.Bottom: return {
19526
+ x: "center",
19527
+ y: "end"
19528
+ };
19529
+ case Position.Left: return {
19530
+ x: "start",
19531
+ y: "center"
19532
+ };
19533
+ case Position.Right: return {
19534
+ x: "end",
19535
+ y: "center"
19536
+ };
19537
+ case Position.TopLeft: return {
19538
+ x: "start",
19539
+ y: "start"
19540
+ };
19541
+ case Position.TopRight: return {
19542
+ x: "end",
19543
+ y: "start"
19544
+ };
19545
+ case Position.BottomLeft: return {
19546
+ x: "start",
19547
+ y: "end"
19548
+ };
19549
+ case Position.BottomRight: return {
19550
+ x: "end",
19551
+ y: "end"
19552
+ };
19553
+ default: return;
19554
+ }
19555
+ };
19519
19556
  var handleLineEnter = (element, chart, annotation) => {
19520
19557
  chart.canvas.style.cursor = CursorStyle.Pointer;
19521
19558
  if (element.options.scaleID?.includes(AxisType.X)) {
@@ -19643,9 +19680,24 @@ const generateAnn = (ann, index) => {
19643
19680
  borderRadius: 3,
19644
19681
  borderColor: ann?.labelConfig?.borderColor ?? "transparent"
19645
19682
  },
19646
- [AnnotationType$1.LABEL]: defLabel,
19647
- [AnnotationType$1.BOX]: defLabel,
19648
- [AnnotationType$1.ELLIPSE]: defLabel
19683
+ [AnnotationType$1.LABEL]: {
19684
+ ...defLabel,
19685
+ ...ann?.labelConfig,
19686
+ position: mapToBoxLikeLabelPosition(ann?.labelConfig?.position),
19687
+ content: ann?.label
19688
+ },
19689
+ [AnnotationType$1.BOX]: {
19690
+ ...defLabel,
19691
+ ...ann?.labelConfig,
19692
+ position: mapToBoxLikeLabelPosition(ann?.labelConfig?.position),
19693
+ content: ann?.label
19694
+ },
19695
+ [AnnotationType$1.ELLIPSE]: {
19696
+ ...defLabel,
19697
+ ...ann?.labelConfig,
19698
+ position: mapToBoxLikeLabelPosition(ann?.labelConfig?.position),
19699
+ content: ann?.label
19700
+ }
19649
19701
  }[type] || defLabel;
19650
19702
  const enter = ({ element }, { chart }) => {
19651
19703
  switch (type) {
package/dist/project.json CHANGED
@@ -1 +1 @@
1
- {"generatedAt":1771947211469,"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":1772548226808,"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"}
@@ -15,12 +15,6 @@ export declare const generateAnn: (ann: ICommonAnnotationsData, index: number) =
15
15
  id: string;
16
16
  scaleID: "x" | "y";
17
17
  label: {
18
- content: string;
19
- display: boolean;
20
- font: {
21
- weight: string;
22
- };
23
- } | {
24
18
  backgroundColor: string;
25
19
  content: string;
26
20
  display: boolean;
@@ -42,6 +36,54 @@ export declare const generateAnn: (ann: ICommonAnnotationsData, index: number) =
42
36
  padding: number;
43
37
  borderRadius: number;
44
38
  borderColor: any;
39
+ } | {
40
+ position: {
41
+ x: string;
42
+ y: string;
43
+ } | undefined;
44
+ content: string;
45
+ display: boolean;
46
+ font: {
47
+ weight: string;
48
+ };
49
+ backgroundColor?: undefined;
50
+ color?: undefined;
51
+ borderWidth?: undefined;
52
+ padding?: undefined;
53
+ borderRadius?: undefined;
54
+ borderColor?: undefined;
55
+ } | {
56
+ position: {
57
+ x: string;
58
+ y: string;
59
+ } | undefined;
60
+ content: string;
61
+ display: boolean;
62
+ font: {
63
+ weight: string;
64
+ };
65
+ backgroundColor?: undefined;
66
+ color?: undefined;
67
+ borderWidth?: undefined;
68
+ padding?: undefined;
69
+ borderRadius?: undefined;
70
+ borderColor?: undefined;
71
+ } | {
72
+ position: {
73
+ x: string;
74
+ y: string;
75
+ } | undefined;
76
+ content: string;
77
+ display: boolean;
78
+ font: {
79
+ weight: string;
80
+ };
81
+ backgroundColor?: undefined;
82
+ color?: undefined;
83
+ borderWidth?: undefined;
84
+ padding?: undefined;
85
+ borderRadius?: undefined;
86
+ borderColor?: undefined;
45
87
  };
46
88
  backgroundColor: string;
47
89
  borderColor: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/charts-library",
3
- "version": "5.8.0-beta-1",
3
+ "version": "5.8.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-B2fw5Bei.js";var r=(0,e(n(),1).default)(2)(async(e,n)=>e===!1?n:t(n));export{r as formatter};