@apexcura/ui-components 0.0.14-Beta73 → 0.0.14-Beta75

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
@@ -1089,9 +1089,7 @@ var import_highcharts = __toESM(require("highcharts"));
1089
1089
  var import_highcharts_react_official = __toESM(require("highcharts-react-official"));
1090
1090
  var Donut = (props) => {
1091
1091
  console.log(props);
1092
- const total = 100;
1093
- const girls = 20;
1094
- const girlsPercentage = girls / total * 100;
1092
+ const girlsPercentage = 20;
1095
1093
  const chartOptions = {
1096
1094
  chart: {
1097
1095
  type: "pie",
@@ -1104,7 +1102,7 @@ var Donut = (props) => {
1104
1102
  const centerY = chart.plotTop + height / 2;
1105
1103
  if (!chart.customText) {
1106
1104
  chart.customText = chart.renderer.text(
1107
- `${girlsPercentage.toFixed(1)}%`,
1105
+ `Girls ${girlsPercentage.toFixed(1)}%`,
1108
1106
  centerX,
1109
1107
  centerY
1110
1108
  ).attr({
@@ -1135,20 +1133,37 @@ var Donut = (props) => {
1135
1133
  series: [{
1136
1134
  type: "pie",
1137
1135
  name: "Percentage",
1138
- data: props.items
1136
+ data: [{
1137
+ name: "Girls",
1138
+ y: 20,
1139
+ color: "#FF6384"
1140
+ // Custom color for Girls
1141
+ }, {
1142
+ name: "Boys",
1143
+ y: 40,
1144
+ color: "#36A2EB"
1145
+ // Custom color for Boys
1146
+ }, {
1147
+ name: "Students",
1148
+ y: 40,
1149
+ color: "#FFCE56"
1150
+ // Custom color for Students
1151
+ }]
1139
1152
  }],
1153
+ // tooltip: {
1154
+ // // pointFormat: '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.y:.1f}%</b><br/>'
1155
+ // },
1140
1156
  legend: {
1141
1157
  enabled: true,
1142
1158
  align: "left",
1143
1159
  verticalAlign: "middle",
1144
- layout: "proximate",
1160
+ layout: "vertical",
1145
1161
  labelFormatter: function() {
1146
1162
  const point = this;
1147
1163
  return `${point.name}: ${point.y?.toFixed(1)}%`;
1148
1164
  }
1149
1165
  }
1150
1166
  };
1151
- console.log(chartOptions.series);
1152
1167
  return /* @__PURE__ */ import_react31.default.createElement(
1153
1168
  import_highcharts_react_official.default,
1154
1169
  {
package/dist/index.mjs CHANGED
@@ -1028,9 +1028,7 @@ import Highcharts from "highcharts";
1028
1028
  import HighchartsReact from "highcharts-react-official";
1029
1029
  var Donut = (props) => {
1030
1030
  console.log(props);
1031
- const total = 100;
1032
- const girls = 20;
1033
- const girlsPercentage = girls / total * 100;
1031
+ const girlsPercentage = 20;
1034
1032
  const chartOptions = {
1035
1033
  chart: {
1036
1034
  type: "pie",
@@ -1043,7 +1041,7 @@ var Donut = (props) => {
1043
1041
  const centerY = chart.plotTop + height / 2;
1044
1042
  if (!chart.customText) {
1045
1043
  chart.customText = chart.renderer.text(
1046
- `${girlsPercentage.toFixed(1)}%`,
1044
+ `Girls ${girlsPercentage.toFixed(1)}%`,
1047
1045
  centerX,
1048
1046
  centerY
1049
1047
  ).attr({
@@ -1074,20 +1072,37 @@ var Donut = (props) => {
1074
1072
  series: [{
1075
1073
  type: "pie",
1076
1074
  name: "Percentage",
1077
- data: props.items
1075
+ data: [{
1076
+ name: "Girls",
1077
+ y: 20,
1078
+ color: "#FF6384"
1079
+ // Custom color for Girls
1080
+ }, {
1081
+ name: "Boys",
1082
+ y: 40,
1083
+ color: "#36A2EB"
1084
+ // Custom color for Boys
1085
+ }, {
1086
+ name: "Students",
1087
+ y: 40,
1088
+ color: "#FFCE56"
1089
+ // Custom color for Students
1090
+ }]
1078
1091
  }],
1092
+ // tooltip: {
1093
+ // // pointFormat: '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.y:.1f}%</b><br/>'
1094
+ // },
1079
1095
  legend: {
1080
1096
  enabled: true,
1081
1097
  align: "left",
1082
1098
  verticalAlign: "middle",
1083
- layout: "proximate",
1099
+ layout: "vertical",
1084
1100
  labelFormatter: function() {
1085
1101
  const point = this;
1086
1102
  return `${point.name}: ${point.y?.toFixed(1)}%`;
1087
1103
  }
1088
1104
  }
1089
1105
  };
1090
- console.log(chartOptions.series);
1091
1106
  return /* @__PURE__ */ React31.createElement(
1092
1107
  HighchartsReact,
1093
1108
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.14-Beta73",
3
+ "version": "0.0.14-Beta75",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",