@apexcura/ui-components 0.0.14-Beta124 → 0.0.14-Beta126

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.css CHANGED
@@ -350,6 +350,9 @@ video {
350
350
  .table {
351
351
  display: table;
352
352
  }
353
+ .grid {
354
+ display: grid;
355
+ }
353
356
  .hidden {
354
357
  display: none;
355
358
  }
package/dist/index.d.mts CHANGED
@@ -126,4 +126,10 @@ declare const SemiCircleDonut: (props: ElementType) => React$1.JSX.Element;
126
126
 
127
127
  declare const HorizontalBarChart: (props: ElementType) => React$1.JSX.Element;
128
128
 
129
- export { AddMoreTable, ButtonElement, CheckboxElement, CircleDonut, CkEditor, DatePickerElement, DateRangePickerElement, DropDownGroup, FileUpload, HorizontalBarChart, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, SemiCircleDonut, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
129
+ declare const LineChart: (props: ElementType) => React$1.JSX.Element;
130
+
131
+ declare const DoubleBarChart: React$1.FC;
132
+
133
+ declare const BarChart: React$1.FC;
134
+
135
+ export { AddMoreTable, BarChart, ButtonElement, CheckboxElement, CircleDonut, CkEditor, DatePickerElement, DateRangePickerElement, DoubleBarChart, DropDownGroup, FileUpload, HorizontalBarChart, Image, LineChart, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, SemiCircleDonut, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
package/dist/index.d.ts CHANGED
@@ -126,4 +126,10 @@ declare const SemiCircleDonut: (props: ElementType) => React$1.JSX.Element;
126
126
 
127
127
  declare const HorizontalBarChart: (props: ElementType) => React$1.JSX.Element;
128
128
 
129
- export { AddMoreTable, ButtonElement, CheckboxElement, CircleDonut, CkEditor, DatePickerElement, DateRangePickerElement, DropDownGroup, FileUpload, HorizontalBarChart, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, SemiCircleDonut, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
129
+ declare const LineChart: (props: ElementType) => React$1.JSX.Element;
130
+
131
+ declare const DoubleBarChart: React$1.FC;
132
+
133
+ declare const BarChart: React$1.FC;
134
+
135
+ export { AddMoreTable, BarChart, ButtonElement, CheckboxElement, CircleDonut, CkEditor, DatePickerElement, DateRangePickerElement, DoubleBarChart, DropDownGroup, FileUpload, HorizontalBarChart, Image, LineChart, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, SemiCircleDonut, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
package/dist/index.js CHANGED
@@ -31,16 +31,19 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
33
  AddMoreTable: () => AddMoreTable,
34
+ BarChart: () => BarChart,
34
35
  ButtonElement: () => ButtonElement,
35
36
  CheckboxElement: () => CheckboxElement,
36
37
  CircleDonut: () => CircleDonut,
37
38
  CkEditor: () => CkEditor,
38
39
  DatePickerElement: () => DatePickerElement,
39
40
  DateRangePickerElement: () => DateRangePickerElement,
41
+ DoubleBarChart: () => DoubleBarChart,
40
42
  DropDownGroup: () => DropDownGroup,
41
43
  FileUpload: () => FileUpload,
42
44
  HorizontalBarChart: () => HorizontalBarChart,
43
45
  Image: () => Image,
46
+ LineChart: () => LineChart,
44
47
  MultipleSelectElement: () => MultipleSelectElement,
45
48
  Navbar: () => Navbar,
46
49
  NumberElement: () => NumberElement,
@@ -1098,7 +1101,7 @@ var import_chart = require("chart.js");
1098
1101
  import_chart.Chart.register(import_chart.DoughnutController, import_chart.ArcElement, import_chart.Tooltip, import_chart.Legend);
1099
1102
  var CircleDonut = (props) => {
1100
1103
  const data = {
1101
- labels: ["Registration", "Book Appointment", "Diagnostic Tests", "Hospital Facility", "Others Prescriptions"],
1104
+ labels: ["Registration", "Book Appointment", "Diagnostic Tests", "Hospital Facility", "Others, Prescriptions"],
1102
1105
  datasets: [
1103
1106
  {
1104
1107
  label: "Bot Conversation",
@@ -1116,7 +1119,7 @@ var CircleDonut = (props) => {
1116
1119
  };
1117
1120
  const options = {
1118
1121
  responsive: true,
1119
- rotation: -180,
1122
+ rotation: -360,
1120
1123
  plugins: {
1121
1124
  legend: {
1122
1125
  position: "left",
@@ -1156,7 +1159,7 @@ var import_chart2 = require("chart.js");
1156
1159
  import_chart2.Chart.register(import_chart2.DoughnutController, import_chart2.ArcElement, import_chart2.Tooltip, import_chart2.Legend);
1157
1160
  var SemiCircleDonut = (props) => {
1158
1161
  const data = {
1159
- labels: ["Registration", "Book Appointment", "Diagnostic Tests", "Hospital Facility", "Others Prescriptions"],
1162
+ labels: ["Registration", "Book Appointment", "Diagnostic Tests", "Hospital Facility", "Others, Prescriptions"],
1160
1163
  datasets: [
1161
1164
  {
1162
1165
  label: "Bot Conversation",
@@ -1180,6 +1183,7 @@ var SemiCircleDonut = (props) => {
1180
1183
  legend: {
1181
1184
  position: "left",
1182
1185
  labels: {
1186
+ boxWidth: 15,
1183
1187
  generateLabels: (chart) => {
1184
1188
  const dataset = chart.data.datasets[0];
1185
1189
  return chart.data.labels.map((label, index) => {
@@ -1213,7 +1217,7 @@ var SemiCircleDonut = (props) => {
1213
1217
  var import_react33 = __toESM(require("react"));
1214
1218
  var import_react_chartjs_23 = require("react-chartjs-2");
1215
1219
  var import_chart3 = require("chart.js");
1216
- import_chart3.Chart.register(import_chart3.BarElement, import_chart3.CategoryScale, import_chart3.LinearScale, import_chart3.Tooltip, import_chart3.Legend);
1220
+ import_chart3.Chart.register(import_chart3.BarElement, import_chart3.CategoryScale, import_chart3.LinearScale, import_chart3.Tooltip);
1217
1221
  var HorizontalBarChart = (props) => {
1218
1222
  const data = {
1219
1223
  labels: ["18-24", "25-34", "35-44", "45-54", "55-64", "65+"],
@@ -1227,6 +1231,7 @@ var HorizontalBarChart = (props) => {
1227
1231
  const options = {
1228
1232
  responsive: true,
1229
1233
  indexAxis: "y",
1234
+ // This specifies that the bar chart is horizontal
1230
1235
  scales: {
1231
1236
  x: {
1232
1237
  beginAtZero: true,
@@ -1235,6 +1240,12 @@ var HorizontalBarChart = (props) => {
1235
1240
  return `${value}%`;
1236
1241
  }
1237
1242
  }
1243
+ },
1244
+ y: {
1245
+ grid: {
1246
+ display: false
1247
+ // Hide y-axis grid lines
1248
+ }
1238
1249
  }
1239
1250
  },
1240
1251
  plugins: {
@@ -1247,24 +1258,212 @@ var HorizontalBarChart = (props) => {
1247
1258
  return `${label}: ${value}`;
1248
1259
  }
1249
1260
  }
1261
+ },
1262
+ legend: {
1263
+ display: false
1264
+ // Hide the legend
1250
1265
  }
1251
1266
  }
1252
1267
  };
1253
1268
  return /* @__PURE__ */ import_react33.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react33.default.createElement(import_react_chartjs_23.Bar, { data, options }));
1254
1269
  };
1270
+
1271
+ // src/Components/LineChart.tsx
1272
+ var import_react34 = __toESM(require("react"));
1273
+ var import_auto = __toESM(require("chart.js/auto"));
1274
+ var LineChart = (props) => {
1275
+ const chartRef = (0, import_react34.useRef)(null);
1276
+ const chartInstance = (0, import_react34.useRef)(null);
1277
+ const data = [
1278
+ { label: "ROI", data: [10, 30, 50, 70, 90] },
1279
+ // Example data for ROI
1280
+ { label: "Engagement Rate", data: [20, 40, 60, 80, 100] },
1281
+ // Example data for Engagement Rate
1282
+ { label: "Conversion Rate", data: [30, 50, 70, 90, 110] }
1283
+ // Example data for Conversion Rate
1284
+ ];
1285
+ const labels = ["Insta", "Whatsapp", "Messages", "Another", "Example"];
1286
+ (0, import_react34.useEffect)(() => {
1287
+ if (chartRef.current) {
1288
+ if (chartInstance.current) {
1289
+ chartInstance.current.destroy();
1290
+ }
1291
+ chartInstance.current = new import_auto.default(chartRef.current, {
1292
+ type: "line",
1293
+ data: {
1294
+ labels,
1295
+ datasets: data.map((dataset, index) => ({
1296
+ label: dataset.label,
1297
+ data: dataset.data,
1298
+ backgroundColor: index === 0 ? "blue" : index === 1 ? "green" : "yellow",
1299
+ // Circle color in legend
1300
+ pointBackgroundColor: "white",
1301
+ // Circle background color in legend
1302
+ tension: 0.1,
1303
+ fill: false
1304
+ }))
1305
+ },
1306
+ options: {
1307
+ scales: {
1308
+ y: {
1309
+ beginAtZero: true,
1310
+ suggestedMax: 200,
1311
+ // Adjust based on your data range
1312
+ ticks: {
1313
+ callback: function(value) {
1314
+ return value + "%";
1315
+ }
1316
+ }
1317
+ }
1318
+ }
1319
+ }
1320
+ });
1321
+ }
1322
+ return () => {
1323
+ if (chartInstance.current) {
1324
+ chartInstance.current.destroy();
1325
+ }
1326
+ };
1327
+ }, []);
1328
+ return /* @__PURE__ */ import_react34.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react34.default.createElement("canvas", { ref: chartRef }));
1329
+ };
1330
+
1331
+ // src/Components/DoubleBarChart.tsx
1332
+ var import_react35 = __toESM(require("react"));
1333
+ var import_auto2 = __toESM(require("chart.js/auto"));
1334
+ var DoubleBarChart = () => {
1335
+ const chartRef = (0, import_react35.useRef)(null);
1336
+ const chartInstance = (0, import_react35.useRef)(null);
1337
+ (0, import_react35.useEffect)(() => {
1338
+ if (chartRef.current) {
1339
+ if (chartInstance.current) {
1340
+ chartInstance.current.destroy();
1341
+ }
1342
+ chartInstance.current = new import_auto2.default(chartRef.current, {
1343
+ type: "bar",
1344
+ data: {
1345
+ labels: [
1346
+ "Summer Health Tips",
1347
+ "New Services Launch",
1348
+ "Discounts on Checkups",
1349
+ "Wellness Webinar",
1350
+ "LinkedIn Insights"
1351
+ ],
1352
+ datasets: [
1353
+ {
1354
+ label: "Male",
1355
+ data: [60, 70, 50, 80, 65],
1356
+ // Example data for male
1357
+ backgroundColor: "rgba(54, 162, 235, 0.5)",
1358
+ borderColor: "rgba(54, 162, 235, 1)",
1359
+ borderWidth: 1
1360
+ },
1361
+ {
1362
+ label: "Female",
1363
+ data: [70, 65, 75, 55, 85],
1364
+ // Example data for female
1365
+ backgroundColor: "rgba(255, 99, 132, 0.5)",
1366
+ borderColor: "rgba(255, 99, 132, 1)",
1367
+ borderWidth: 1
1368
+ }
1369
+ ]
1370
+ },
1371
+ options: {
1372
+ scales: {
1373
+ y: {
1374
+ beginAtZero: true,
1375
+ suggestedMax: 100,
1376
+ ticks: {
1377
+ callback: function(value) {
1378
+ return value + "%";
1379
+ }
1380
+ }
1381
+ }
1382
+ }
1383
+ }
1384
+ });
1385
+ }
1386
+ return () => {
1387
+ if (chartInstance.current) {
1388
+ chartInstance.current.destroy();
1389
+ }
1390
+ };
1391
+ }, []);
1392
+ return /* @__PURE__ */ import_react35.default.createElement("canvas", { ref: chartRef });
1393
+ };
1394
+
1395
+ // src/Components/BarChart.tsx
1396
+ var import_react36 = __toESM(require("react"));
1397
+ var import_auto3 = __toESM(require("chart.js/auto"));
1398
+ var BarChart = () => {
1399
+ const chartRef = (0, import_react36.useRef)(null);
1400
+ const chartInstance = (0, import_react36.useRef)(null);
1401
+ (0, import_react36.useEffect)(() => {
1402
+ if (chartRef.current) {
1403
+ if (chartInstance.current) {
1404
+ chartInstance.current.destroy();
1405
+ }
1406
+ chartInstance.current = new import_auto3.default(chartRef.current, {
1407
+ type: "bar",
1408
+ data: {
1409
+ labels: [
1410
+ "17 June",
1411
+ "18 June",
1412
+ "19 June",
1413
+ "20 June",
1414
+ "21 June",
1415
+ "22 June",
1416
+ "23 June"
1417
+ ],
1418
+ datasets: [
1419
+ {
1420
+ data: [70, 65, 75, 55, 85],
1421
+ // Example data for female
1422
+ backgroundColor: "rgba(255, 99, 132, 0.5)",
1423
+ borderColor: "rgba(255, 99, 132, 1)",
1424
+ borderWidth: 1
1425
+ }
1426
+ ]
1427
+ },
1428
+ options: {
1429
+ scales: {
1430
+ y: {
1431
+ beginAtZero: true,
1432
+ suggestedMax: 100,
1433
+ ticks: {
1434
+ callback: function(value) {
1435
+ return value + "%";
1436
+ }
1437
+ }
1438
+ }
1439
+ }
1440
+ }
1441
+ });
1442
+ }
1443
+ return () => {
1444
+ if (chartInstance.current) {
1445
+ chartInstance.current.destroy();
1446
+ }
1447
+ };
1448
+ }, []);
1449
+ return /* @__PURE__ */ import_react36.default.createElement("canvas", { ref: chartRef });
1450
+ };
1255
1451
  // Annotate the CommonJS export names for ESM import in node:
1256
1452
  0 && (module.exports = {
1257
1453
  AddMoreTable,
1454
+ BarChart,
1258
1455
  ButtonElement,
1259
1456
  CheckboxElement,
1260
1457
  CircleDonut,
1261
1458
  CkEditor,
1262
1459
  DatePickerElement,
1263
1460
  DateRangePickerElement,
1461
+ DoubleBarChart,
1264
1462
  DropDownGroup,
1265
1463
  FileUpload,
1266
1464
  HorizontalBarChart,
1267
1465
  Image,
1466
+ LineChart,
1268
1467
  MultipleSelectElement,
1269
1468
  Navbar,
1270
1469
  NumberElement,
package/dist/index.mjs CHANGED
@@ -1041,7 +1041,7 @@ import {
1041
1041
  ChartJS.register(DoughnutController, ArcElement, Tooltip, Legend);
1042
1042
  var CircleDonut = (props) => {
1043
1043
  const data = {
1044
- labels: ["Registration", "Book Appointment", "Diagnostic Tests", "Hospital Facility", "Others Prescriptions"],
1044
+ labels: ["Registration", "Book Appointment", "Diagnostic Tests", "Hospital Facility", "Others, Prescriptions"],
1045
1045
  datasets: [
1046
1046
  {
1047
1047
  label: "Bot Conversation",
@@ -1059,7 +1059,7 @@ var CircleDonut = (props) => {
1059
1059
  };
1060
1060
  const options = {
1061
1061
  responsive: true,
1062
- rotation: -180,
1062
+ rotation: -360,
1063
1063
  plugins: {
1064
1064
  legend: {
1065
1065
  position: "left",
@@ -1105,7 +1105,7 @@ import {
1105
1105
  ChartJS2.register(DoughnutController2, ArcElement2, Tooltip2, Legend2);
1106
1106
  var SemiCircleDonut = (props) => {
1107
1107
  const data = {
1108
- labels: ["Registration", "Book Appointment", "Diagnostic Tests", "Hospital Facility", "Others Prescriptions"],
1108
+ labels: ["Registration", "Book Appointment", "Diagnostic Tests", "Hospital Facility", "Others, Prescriptions"],
1109
1109
  datasets: [
1110
1110
  {
1111
1111
  label: "Bot Conversation",
@@ -1129,6 +1129,7 @@ var SemiCircleDonut = (props) => {
1129
1129
  legend: {
1130
1130
  position: "left",
1131
1131
  labels: {
1132
+ boxWidth: 15,
1132
1133
  generateLabels: (chart) => {
1133
1134
  const dataset = chart.data.datasets[0];
1134
1135
  return chart.data.labels.map((label, index) => {
@@ -1166,10 +1167,9 @@ import {
1166
1167
  BarElement,
1167
1168
  CategoryScale,
1168
1169
  LinearScale,
1169
- Tooltip as Tooltip3,
1170
- Legend as Legend3
1170
+ Tooltip as Tooltip3
1171
1171
  } from "chart.js";
1172
- ChartJS3.register(BarElement, CategoryScale, LinearScale, Tooltip3, Legend3);
1172
+ ChartJS3.register(BarElement, CategoryScale, LinearScale, Tooltip3);
1173
1173
  var HorizontalBarChart = (props) => {
1174
1174
  const data = {
1175
1175
  labels: ["18-24", "25-34", "35-44", "45-54", "55-64", "65+"],
@@ -1183,6 +1183,7 @@ var HorizontalBarChart = (props) => {
1183
1183
  const options = {
1184
1184
  responsive: true,
1185
1185
  indexAxis: "y",
1186
+ // This specifies that the bar chart is horizontal
1186
1187
  scales: {
1187
1188
  x: {
1188
1189
  beginAtZero: true,
@@ -1191,6 +1192,12 @@ var HorizontalBarChart = (props) => {
1191
1192
  return `${value}%`;
1192
1193
  }
1193
1194
  }
1195
+ },
1196
+ y: {
1197
+ grid: {
1198
+ display: false
1199
+ // Hide y-axis grid lines
1200
+ }
1194
1201
  }
1195
1202
  },
1196
1203
  plugins: {
@@ -1203,23 +1210,211 @@ var HorizontalBarChart = (props) => {
1203
1210
  return `${label}: ${value}`;
1204
1211
  }
1205
1212
  }
1213
+ },
1214
+ legend: {
1215
+ display: false
1216
+ // Hide the legend
1206
1217
  }
1207
1218
  }
1208
1219
  };
1209
1220
  return /* @__PURE__ */ React33.createElement("div", { className: props.className }, /* @__PURE__ */ React33.createElement(Bar, { data, options }));
1210
1221
  };
1222
+
1223
+ // src/Components/LineChart.tsx
1224
+ import React34, { useEffect as useEffect4, useRef as useRef2 } from "react";
1225
+ import Chart from "chart.js/auto";
1226
+ var LineChart = (props) => {
1227
+ const chartRef = useRef2(null);
1228
+ const chartInstance = useRef2(null);
1229
+ const data = [
1230
+ { label: "ROI", data: [10, 30, 50, 70, 90] },
1231
+ // Example data for ROI
1232
+ { label: "Engagement Rate", data: [20, 40, 60, 80, 100] },
1233
+ // Example data for Engagement Rate
1234
+ { label: "Conversion Rate", data: [30, 50, 70, 90, 110] }
1235
+ // Example data for Conversion Rate
1236
+ ];
1237
+ const labels = ["Insta", "Whatsapp", "Messages", "Another", "Example"];
1238
+ useEffect4(() => {
1239
+ if (chartRef.current) {
1240
+ if (chartInstance.current) {
1241
+ chartInstance.current.destroy();
1242
+ }
1243
+ chartInstance.current = new Chart(chartRef.current, {
1244
+ type: "line",
1245
+ data: {
1246
+ labels,
1247
+ datasets: data.map((dataset, index) => ({
1248
+ label: dataset.label,
1249
+ data: dataset.data,
1250
+ backgroundColor: index === 0 ? "blue" : index === 1 ? "green" : "yellow",
1251
+ // Circle color in legend
1252
+ pointBackgroundColor: "white",
1253
+ // Circle background color in legend
1254
+ tension: 0.1,
1255
+ fill: false
1256
+ }))
1257
+ },
1258
+ options: {
1259
+ scales: {
1260
+ y: {
1261
+ beginAtZero: true,
1262
+ suggestedMax: 200,
1263
+ // Adjust based on your data range
1264
+ ticks: {
1265
+ callback: function(value) {
1266
+ return value + "%";
1267
+ }
1268
+ }
1269
+ }
1270
+ }
1271
+ }
1272
+ });
1273
+ }
1274
+ return () => {
1275
+ if (chartInstance.current) {
1276
+ chartInstance.current.destroy();
1277
+ }
1278
+ };
1279
+ }, []);
1280
+ return /* @__PURE__ */ React34.createElement("div", { className: props.className }, /* @__PURE__ */ React34.createElement("canvas", { ref: chartRef }));
1281
+ };
1282
+
1283
+ // src/Components/DoubleBarChart.tsx
1284
+ import React35, { useEffect as useEffect5, useRef as useRef3 } from "react";
1285
+ import Chart2 from "chart.js/auto";
1286
+ var DoubleBarChart = () => {
1287
+ const chartRef = useRef3(null);
1288
+ const chartInstance = useRef3(null);
1289
+ useEffect5(() => {
1290
+ if (chartRef.current) {
1291
+ if (chartInstance.current) {
1292
+ chartInstance.current.destroy();
1293
+ }
1294
+ chartInstance.current = new Chart2(chartRef.current, {
1295
+ type: "bar",
1296
+ data: {
1297
+ labels: [
1298
+ "Summer Health Tips",
1299
+ "New Services Launch",
1300
+ "Discounts on Checkups",
1301
+ "Wellness Webinar",
1302
+ "LinkedIn Insights"
1303
+ ],
1304
+ datasets: [
1305
+ {
1306
+ label: "Male",
1307
+ data: [60, 70, 50, 80, 65],
1308
+ // Example data for male
1309
+ backgroundColor: "rgba(54, 162, 235, 0.5)",
1310
+ borderColor: "rgba(54, 162, 235, 1)",
1311
+ borderWidth: 1
1312
+ },
1313
+ {
1314
+ label: "Female",
1315
+ data: [70, 65, 75, 55, 85],
1316
+ // Example data for female
1317
+ backgroundColor: "rgba(255, 99, 132, 0.5)",
1318
+ borderColor: "rgba(255, 99, 132, 1)",
1319
+ borderWidth: 1
1320
+ }
1321
+ ]
1322
+ },
1323
+ options: {
1324
+ scales: {
1325
+ y: {
1326
+ beginAtZero: true,
1327
+ suggestedMax: 100,
1328
+ ticks: {
1329
+ callback: function(value) {
1330
+ return value + "%";
1331
+ }
1332
+ }
1333
+ }
1334
+ }
1335
+ }
1336
+ });
1337
+ }
1338
+ return () => {
1339
+ if (chartInstance.current) {
1340
+ chartInstance.current.destroy();
1341
+ }
1342
+ };
1343
+ }, []);
1344
+ return /* @__PURE__ */ React35.createElement("canvas", { ref: chartRef });
1345
+ };
1346
+
1347
+ // src/Components/BarChart.tsx
1348
+ import React36, { useEffect as useEffect6, useRef as useRef4 } from "react";
1349
+ import Chart3 from "chart.js/auto";
1350
+ var BarChart = () => {
1351
+ const chartRef = useRef4(null);
1352
+ const chartInstance = useRef4(null);
1353
+ useEffect6(() => {
1354
+ if (chartRef.current) {
1355
+ if (chartInstance.current) {
1356
+ chartInstance.current.destroy();
1357
+ }
1358
+ chartInstance.current = new Chart3(chartRef.current, {
1359
+ type: "bar",
1360
+ data: {
1361
+ labels: [
1362
+ "17 June",
1363
+ "18 June",
1364
+ "19 June",
1365
+ "20 June",
1366
+ "21 June",
1367
+ "22 June",
1368
+ "23 June"
1369
+ ],
1370
+ datasets: [
1371
+ {
1372
+ data: [70, 65, 75, 55, 85],
1373
+ // Example data for female
1374
+ backgroundColor: "rgba(255, 99, 132, 0.5)",
1375
+ borderColor: "rgba(255, 99, 132, 1)",
1376
+ borderWidth: 1
1377
+ }
1378
+ ]
1379
+ },
1380
+ options: {
1381
+ scales: {
1382
+ y: {
1383
+ beginAtZero: true,
1384
+ suggestedMax: 100,
1385
+ ticks: {
1386
+ callback: function(value) {
1387
+ return value + "%";
1388
+ }
1389
+ }
1390
+ }
1391
+ }
1392
+ }
1393
+ });
1394
+ }
1395
+ return () => {
1396
+ if (chartInstance.current) {
1397
+ chartInstance.current.destroy();
1398
+ }
1399
+ };
1400
+ }, []);
1401
+ return /* @__PURE__ */ React36.createElement("canvas", { ref: chartRef });
1402
+ };
1211
1403
  export {
1212
1404
  AddMoreTable,
1405
+ BarChart,
1213
1406
  ButtonElement,
1214
1407
  CheckboxElement,
1215
1408
  CircleDonut,
1216
1409
  CkEditor,
1217
1410
  DatePickerElement,
1218
1411
  DateRangePickerElement,
1412
+ DoubleBarChart,
1219
1413
  DropDownGroup,
1220
1414
  FileUpload,
1221
1415
  HorizontalBarChart,
1222
1416
  Image,
1417
+ LineChart,
1223
1418
  MultipleSelectElement,
1224
1419
  Navbar,
1225
1420
  NumberElement,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.14-Beta124",
3
+ "version": "0.0.14-Beta126",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",