@apexcura/ui-components 0.0.14-Beta125 → 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,7 +126,7 @@ 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
- declare const LineChart: React$1.FC;
129
+ declare const LineChart: (props: ElementType) => React$1.JSX.Element;
130
130
 
131
131
  declare const DoubleBarChart: React$1.FC;
132
132
 
package/dist/index.d.ts CHANGED
@@ -126,7 +126,7 @@ 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
- declare const LineChart: React$1.FC;
129
+ declare const LineChart: (props: ElementType) => React$1.JSX.Element;
130
130
 
131
131
  declare const DoubleBarChart: React$1.FC;
132
132
 
package/dist/index.js CHANGED
@@ -1230,6 +1230,8 @@ var HorizontalBarChart = (props) => {
1230
1230
  };
1231
1231
  const options = {
1232
1232
  responsive: true,
1233
+ indexAxis: "y",
1234
+ // This specifies that the bar chart is horizontal
1233
1235
  scales: {
1234
1236
  x: {
1235
1237
  beginAtZero: true,
@@ -1238,6 +1240,12 @@ var HorizontalBarChart = (props) => {
1238
1240
  return `${value}%`;
1239
1241
  }
1240
1242
  }
1243
+ },
1244
+ y: {
1245
+ grid: {
1246
+ display: false
1247
+ // Hide y-axis grid lines
1248
+ }
1241
1249
  }
1242
1250
  },
1243
1251
  plugins: {
@@ -1250,6 +1258,10 @@ var HorizontalBarChart = (props) => {
1250
1258
  return `${label}: ${value}`;
1251
1259
  }
1252
1260
  }
1261
+ },
1262
+ legend: {
1263
+ display: false
1264
+ // Hide the legend
1253
1265
  }
1254
1266
  }
1255
1267
  };
@@ -1259,15 +1271,18 @@ var HorizontalBarChart = (props) => {
1259
1271
  // src/Components/LineChart.tsx
1260
1272
  var import_react34 = __toESM(require("react"));
1261
1273
  var import_auto = __toESM(require("chart.js/auto"));
1262
- var LineChart = () => {
1274
+ var LineChart = (props) => {
1263
1275
  const chartRef = (0, import_react34.useRef)(null);
1264
1276
  const chartInstance = (0, import_react34.useRef)(null);
1265
1277
  const data = [
1266
1278
  { label: "ROI", data: [10, 30, 50, 70, 90] },
1279
+ // Example data for ROI
1267
1280
  { label: "Engagement Rate", data: [20, 40, 60, 80, 100] },
1281
+ // Example data for Engagement Rate
1268
1282
  { label: "Conversion Rate", data: [30, 50, 70, 90, 110] }
1283
+ // Example data for Conversion Rate
1269
1284
  ];
1270
- const labels = ["Instagram", "Whatsapp", "Messages", "Facebook", "Linkedin"];
1285
+ const labels = ["Insta", "Whatsapp", "Messages", "Another", "Example"];
1271
1286
  (0, import_react34.useEffect)(() => {
1272
1287
  if (chartRef.current) {
1273
1288
  if (chartInstance.current) {
@@ -1280,8 +1295,10 @@ var LineChart = () => {
1280
1295
  datasets: data.map((dataset, index) => ({
1281
1296
  label: dataset.label,
1282
1297
  data: dataset.data,
1283
- borderColor: `rgb(${index * 100}, ${255 - index * 50}, ${index * 50})`,
1284
- // Example dynamic color generation
1298
+ backgroundColor: index === 0 ? "blue" : index === 1 ? "green" : "yellow",
1299
+ // Circle color in legend
1300
+ pointBackgroundColor: "white",
1301
+ // Circle background color in legend
1285
1302
  tension: 0.1,
1286
1303
  fill: false
1287
1304
  }))
@@ -1308,7 +1325,7 @@ var LineChart = () => {
1308
1325
  }
1309
1326
  };
1310
1327
  }, []);
1311
- return /* @__PURE__ */ import_react34.default.createElement("canvas", { ref: chartRef });
1328
+ return /* @__PURE__ */ import_react34.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react34.default.createElement("canvas", { ref: chartRef }));
1312
1329
  };
1313
1330
 
1314
1331
  // src/Components/DoubleBarChart.tsx
package/dist/index.mjs CHANGED
@@ -1182,6 +1182,8 @@ var HorizontalBarChart = (props) => {
1182
1182
  };
1183
1183
  const options = {
1184
1184
  responsive: true,
1185
+ indexAxis: "y",
1186
+ // This specifies that the bar chart is horizontal
1185
1187
  scales: {
1186
1188
  x: {
1187
1189
  beginAtZero: true,
@@ -1190,6 +1192,12 @@ var HorizontalBarChart = (props) => {
1190
1192
  return `${value}%`;
1191
1193
  }
1192
1194
  }
1195
+ },
1196
+ y: {
1197
+ grid: {
1198
+ display: false
1199
+ // Hide y-axis grid lines
1200
+ }
1193
1201
  }
1194
1202
  },
1195
1203
  plugins: {
@@ -1202,6 +1210,10 @@ var HorizontalBarChart = (props) => {
1202
1210
  return `${label}: ${value}`;
1203
1211
  }
1204
1212
  }
1213
+ },
1214
+ legend: {
1215
+ display: false
1216
+ // Hide the legend
1205
1217
  }
1206
1218
  }
1207
1219
  };
@@ -1211,15 +1223,18 @@ var HorizontalBarChart = (props) => {
1211
1223
  // src/Components/LineChart.tsx
1212
1224
  import React34, { useEffect as useEffect4, useRef as useRef2 } from "react";
1213
1225
  import Chart from "chart.js/auto";
1214
- var LineChart = () => {
1226
+ var LineChart = (props) => {
1215
1227
  const chartRef = useRef2(null);
1216
1228
  const chartInstance = useRef2(null);
1217
1229
  const data = [
1218
1230
  { label: "ROI", data: [10, 30, 50, 70, 90] },
1231
+ // Example data for ROI
1219
1232
  { label: "Engagement Rate", data: [20, 40, 60, 80, 100] },
1233
+ // Example data for Engagement Rate
1220
1234
  { label: "Conversion Rate", data: [30, 50, 70, 90, 110] }
1235
+ // Example data for Conversion Rate
1221
1236
  ];
1222
- const labels = ["Instagram", "Whatsapp", "Messages", "Facebook", "Linkedin"];
1237
+ const labels = ["Insta", "Whatsapp", "Messages", "Another", "Example"];
1223
1238
  useEffect4(() => {
1224
1239
  if (chartRef.current) {
1225
1240
  if (chartInstance.current) {
@@ -1232,8 +1247,10 @@ var LineChart = () => {
1232
1247
  datasets: data.map((dataset, index) => ({
1233
1248
  label: dataset.label,
1234
1249
  data: dataset.data,
1235
- borderColor: `rgb(${index * 100}, ${255 - index * 50}, ${index * 50})`,
1236
- // Example dynamic color generation
1250
+ backgroundColor: index === 0 ? "blue" : index === 1 ? "green" : "yellow",
1251
+ // Circle color in legend
1252
+ pointBackgroundColor: "white",
1253
+ // Circle background color in legend
1237
1254
  tension: 0.1,
1238
1255
  fill: false
1239
1256
  }))
@@ -1260,7 +1277,7 @@ var LineChart = () => {
1260
1277
  }
1261
1278
  };
1262
1279
  }, []);
1263
- return /* @__PURE__ */ React34.createElement("canvas", { ref: chartRef });
1280
+ return /* @__PURE__ */ React34.createElement("div", { className: props.className }, /* @__PURE__ */ React34.createElement("canvas", { ref: chartRef }));
1264
1281
  };
1265
1282
 
1266
1283
  // src/Components/DoubleBarChart.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.14-Beta125",
3
+ "version": "0.0.14-Beta126",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",