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

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.js CHANGED
@@ -1121,15 +1121,14 @@ var CircleDonut = (props) => {
1121
1121
  legend: {
1122
1122
  position: "left",
1123
1123
  labels: {
1124
+ boxWidth: 15,
1124
1125
  generateLabels: (chart) => {
1125
1126
  const dataset = chart.data.datasets[0];
1126
1127
  return chart.data.labels.map((label, index) => {
1127
1128
  const value = dataset.data[index];
1128
1129
  return {
1129
1130
  text: `${label}: ${value}`,
1130
- fillStyle: dataset.backgroundColor[index],
1131
- hidden: isNaN(dataset.data[index]) || dataset.data[index] === null,
1132
- index
1131
+ fillStyle: dataset.backgroundColor[index]
1133
1132
  };
1134
1133
  });
1135
1134
  }
@@ -1217,10 +1216,9 @@ var import_chart3 = require("chart.js");
1217
1216
  import_chart3.Chart.register(import_chart3.BarElement, import_chart3.CategoryScale, import_chart3.LinearScale, import_chart3.Tooltip, import_chart3.Legend);
1218
1217
  var HorizontalBarChart = (props) => {
1219
1218
  const data = {
1220
- labels: ["65+", "55-64", "45-54", "35-44", "25-34", "18-24"],
1219
+ labels: ["18-24", "25-34", "35-44", "45-54", "55-64", "65+"],
1221
1220
  datasets: [
1222
1221
  {
1223
- label: "Bot Conversation",
1224
1222
  data: [30, 10, 27, 40, 12, 24],
1225
1223
  backgroundColor: "#6298D5"
1226
1224
  }
@@ -1231,32 +1229,15 @@ var HorizontalBarChart = (props) => {
1231
1229
  indexAxis: "y",
1232
1230
  scales: {
1233
1231
  x: {
1234
- beginAtZero: true
1235
- },
1236
- y: {
1232
+ beginAtZero: true,
1237
1233
  ticks: {
1238
- callback: (value) => `${value}%`
1234
+ callback: function(value) {
1235
+ return `${value}%`;
1236
+ }
1239
1237
  }
1240
1238
  }
1241
1239
  },
1242
1240
  plugins: {
1243
- legend: {
1244
- position: "top",
1245
- labels: {
1246
- generateLabels: (chart) => {
1247
- const dataset = chart.data.datasets[0];
1248
- return chart.data.labels.map((label, index) => {
1249
- const value = dataset.data[index];
1250
- return {
1251
- text: `${label}: ${value}`,
1252
- fillStyle: dataset.backgroundColor[index],
1253
- hidden: isNaN(dataset.data[index]) || dataset.data[index] === null,
1254
- index
1255
- };
1256
- });
1257
- }
1258
- }
1259
- },
1260
1241
  tooltip: {
1261
1242
  enabled: true,
1262
1243
  callbacks: {
package/dist/index.mjs CHANGED
@@ -1064,15 +1064,14 @@ var CircleDonut = (props) => {
1064
1064
  legend: {
1065
1065
  position: "left",
1066
1066
  labels: {
1067
+ boxWidth: 15,
1067
1068
  generateLabels: (chart) => {
1068
1069
  const dataset = chart.data.datasets[0];
1069
1070
  return chart.data.labels.map((label, index) => {
1070
1071
  const value = dataset.data[index];
1071
1072
  return {
1072
1073
  text: `${label}: ${value}`,
1073
- fillStyle: dataset.backgroundColor[index],
1074
- hidden: isNaN(dataset.data[index]) || dataset.data[index] === null,
1075
- index
1074
+ fillStyle: dataset.backgroundColor[index]
1076
1075
  };
1077
1076
  });
1078
1077
  }
@@ -1173,10 +1172,9 @@ import {
1173
1172
  ChartJS3.register(BarElement, CategoryScale, LinearScale, Tooltip3, Legend3);
1174
1173
  var HorizontalBarChart = (props) => {
1175
1174
  const data = {
1176
- labels: ["65+", "55-64", "45-54", "35-44", "25-34", "18-24"],
1175
+ labels: ["18-24", "25-34", "35-44", "45-54", "55-64", "65+"],
1177
1176
  datasets: [
1178
1177
  {
1179
- label: "Bot Conversation",
1180
1178
  data: [30, 10, 27, 40, 12, 24],
1181
1179
  backgroundColor: "#6298D5"
1182
1180
  }
@@ -1187,32 +1185,15 @@ var HorizontalBarChart = (props) => {
1187
1185
  indexAxis: "y",
1188
1186
  scales: {
1189
1187
  x: {
1190
- beginAtZero: true
1191
- },
1192
- y: {
1188
+ beginAtZero: true,
1193
1189
  ticks: {
1194
- callback: (value) => `${value}%`
1190
+ callback: function(value) {
1191
+ return `${value}%`;
1192
+ }
1195
1193
  }
1196
1194
  }
1197
1195
  },
1198
1196
  plugins: {
1199
- legend: {
1200
- position: "top",
1201
- labels: {
1202
- generateLabels: (chart) => {
1203
- const dataset = chart.data.datasets[0];
1204
- return chart.data.labels.map((label, index) => {
1205
- const value = dataset.data[index];
1206
- return {
1207
- text: `${label}: ${value}`,
1208
- fillStyle: dataset.backgroundColor[index],
1209
- hidden: isNaN(dataset.data[index]) || dataset.data[index] === null,
1210
- index
1211
- };
1212
- });
1213
- }
1214
- }
1215
- },
1216
1197
  tooltip: {
1217
1198
  enabled: true,
1218
1199
  callbacks: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.14-Beta122",
3
+ "version": "0.0.14-Beta124",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",