@apexcura/ui-components 0.0.14-Beta123 → 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 +9 -10
- package/dist/index.mjs +9 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1121,19 +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,
|
|
1133
|
-
boxWidth: 20,
|
|
1134
|
-
// Set the width of the legend box
|
|
1135
|
-
borderColor: "transparent"
|
|
1136
|
-
// Eliminate the border color
|
|
1131
|
+
fillStyle: dataset.backgroundColor[index]
|
|
1137
1132
|
};
|
|
1138
1133
|
});
|
|
1139
1134
|
}
|
|
@@ -1221,10 +1216,9 @@ var import_chart3 = require("chart.js");
|
|
|
1221
1216
|
import_chart3.Chart.register(import_chart3.BarElement, import_chart3.CategoryScale, import_chart3.LinearScale, import_chart3.Tooltip, import_chart3.Legend);
|
|
1222
1217
|
var HorizontalBarChart = (props) => {
|
|
1223
1218
|
const data = {
|
|
1224
|
-
labels: ["
|
|
1219
|
+
labels: ["18-24", "25-34", "35-44", "45-54", "55-64", "65+"],
|
|
1225
1220
|
datasets: [
|
|
1226
1221
|
{
|
|
1227
|
-
label: "Bot Conversation",
|
|
1228
1222
|
data: [30, 10, 27, 40, 12, 24],
|
|
1229
1223
|
backgroundColor: "#6298D5"
|
|
1230
1224
|
}
|
|
@@ -1235,7 +1229,12 @@ var HorizontalBarChart = (props) => {
|
|
|
1235
1229
|
indexAxis: "y",
|
|
1236
1230
|
scales: {
|
|
1237
1231
|
x: {
|
|
1238
|
-
beginAtZero: true
|
|
1232
|
+
beginAtZero: true,
|
|
1233
|
+
ticks: {
|
|
1234
|
+
callback: function(value) {
|
|
1235
|
+
return `${value}%`;
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1239
1238
|
}
|
|
1240
1239
|
},
|
|
1241
1240
|
plugins: {
|
package/dist/index.mjs
CHANGED
|
@@ -1064,19 +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,
|
|
1076
|
-
boxWidth: 20,
|
|
1077
|
-
// Set the width of the legend box
|
|
1078
|
-
borderColor: "transparent"
|
|
1079
|
-
// Eliminate the border color
|
|
1074
|
+
fillStyle: dataset.backgroundColor[index]
|
|
1080
1075
|
};
|
|
1081
1076
|
});
|
|
1082
1077
|
}
|
|
@@ -1177,10 +1172,9 @@ import {
|
|
|
1177
1172
|
ChartJS3.register(BarElement, CategoryScale, LinearScale, Tooltip3, Legend3);
|
|
1178
1173
|
var HorizontalBarChart = (props) => {
|
|
1179
1174
|
const data = {
|
|
1180
|
-
labels: ["
|
|
1175
|
+
labels: ["18-24", "25-34", "35-44", "45-54", "55-64", "65+"],
|
|
1181
1176
|
datasets: [
|
|
1182
1177
|
{
|
|
1183
|
-
label: "Bot Conversation",
|
|
1184
1178
|
data: [30, 10, 27, 40, 12, 24],
|
|
1185
1179
|
backgroundColor: "#6298D5"
|
|
1186
1180
|
}
|
|
@@ -1191,7 +1185,12 @@ var HorizontalBarChart = (props) => {
|
|
|
1191
1185
|
indexAxis: "y",
|
|
1192
1186
|
scales: {
|
|
1193
1187
|
x: {
|
|
1194
|
-
beginAtZero: true
|
|
1188
|
+
beginAtZero: true,
|
|
1189
|
+
ticks: {
|
|
1190
|
+
callback: function(value) {
|
|
1191
|
+
return `${value}%`;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1195
1194
|
}
|
|
1196
1195
|
},
|
|
1197
1196
|
plugins: {
|