pixelize-design-library 2.2.11-test-2 → 2.2.11-test-5

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.
@@ -26,86 +26,14 @@ var ApexPieChart = function (_a) {
26
26
  } : _g, _h = _a.legendPosition, legendPosition = _h === void 0 ? "bottom" : _h, _j = _a.legendStyle, legendStyle = _j === void 0 ? {
27
27
  colors: "#000",
28
28
  useSeriesColors: false,
29
+ horizontalGap: 10,
30
+ verticalGap: 5,
31
+ markerSize: 8,
32
+ markerOffsetX: -5,
33
+ markerOffsetY: 0,
29
34
  } : _j, _k = _a.variant, variant = _k === void 0 ? "pie" : _k;
30
35
  var extraOptions = {};
31
- switch (variant) {
32
- case "semi-donut":
33
- extraOptions = {
34
- plotOptions: {
35
- pie: {
36
- startAngle: -90,
37
- endAngle: 90,
38
- offsetY: 10,
39
- },
40
- },
41
- };
42
- break;
43
- case "monochrome-pie":
44
- extraOptions = {
45
- theme: {
46
- monochrome: {
47
- enabled: true,
48
- shadeTo: "light",
49
- shadeIntensity: 0.65,
50
- },
51
- },
52
- };
53
- break;
54
- case "gradient-donut":
55
- extraOptions = {
56
- fill: {
57
- type: "gradient",
58
- },
59
- };
60
- break;
61
- case "donut-with-pattern":
62
- extraOptions = {
63
- fill: {
64
- type: "pattern",
65
- pattern: {
66
- style: ["verticalLines", "squares", "horizontalLines", "circles"],
67
- },
68
- },
69
- };
70
- break;
71
- case "pie-with-image":
72
- extraOptions = {
73
- fill: {
74
- type: "image",
75
- image: {
76
- src: [
77
- "https://i.imgur.com/UM3mrju.jpg",
78
- "https://i.imgur.com/NpPOqQq.jpg",
79
- ],
80
- },
81
- },
82
- };
83
- break;
84
- case "update-donut":
85
- extraOptions = {
86
- plotOptions: {
87
- pie: {
88
- donut: {
89
- labels: {
90
- show: true,
91
- total: {
92
- show: true,
93
- label: "Total",
94
- },
95
- },
96
- },
97
- },
98
- },
99
- };
100
- break;
101
- case "pie":
102
- extraOptions = {
103
- chart: { type: "pie" },
104
- };
105
- break;
106
- default:
107
- break;
108
- }
36
+ // ... (your existing switch cases remain the same)
109
37
  var options = __assign({ chart: {
110
38
  type: variant.includes("pie") ? "pie" : "donut",
111
39
  }, labels: labels, colors: (_b = chartColor !== null && chartColor !== void 0 ? chartColor : donutColors) !== null && _b !== void 0 ? _b : ["#3182ce", "#e53e3e", "#38a169", "#dd6b20"], legend: {
@@ -115,13 +43,22 @@ var ApexPieChart = function (_a) {
115
43
  useSeriesColors: legendStyle.useSeriesColors,
116
44
  },
117
45
  markers: {
118
- size: 8,
119
- offsetX: -5,
120
- offsetY: 0,
46
+ size: legendStyle.markerSize,
47
+ offsetX: legendStyle.markerOffsetX,
48
+ offsetY: legendStyle.markerOffsetY,
49
+ strokeWidth: 0,
50
+ shape: 'circle',
51
+ // ✅ You can also customize the stroke color and width
52
+ // strokeColor: '#000',
53
+ // strokeWidth: 1,
121
54
  },
122
- // itemMargin: {
123
- // horizontal: 10, // space between marker and label
124
- // vertical: 5,
55
+ itemMargin: {
56
+ horizontal: legendStyle.horizontalGap,
57
+ vertical: legendStyle.verticalGap, // Space between legend rows
58
+ },
59
+ // containerMargin: {
60
+ // left: 0,
61
+ // top: 0,
125
62
  // },
126
63
  }, title: {
127
64
  text: title,
@@ -18,6 +18,11 @@ export type ApexPieChartProps = {
18
18
  legendStyle?: {
19
19
  colors?: string | string[];
20
20
  useSeriesColors?: boolean;
21
+ horizontalGap?: number;
22
+ verticalGap?: number;
23
+ markerSize?: number;
24
+ markerOffsetX?: number;
25
+ markerOffsetY?: number;
21
26
  };
22
27
  };
23
28
  export type DonutPieVariant = "pie" | "donut" | "update-donut" | "monochrome-pie" | "gradient-donut" | "semi-donut" | "donut-with-pattern" | "pie-with-image";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "2.2.11-test-2",
3
+ "version": "2.2.11-test-5",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",