yaml-admin-api 0.0.96 → 0.0.99

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yaml-admin-api",
3
- "version": "0.0.96",
3
+ "version": "0.0.99",
4
4
  "license": "MIT",
5
5
  "description": "YAML Admin API package",
6
6
  "type": "commonjs",
@@ -249,6 +249,11 @@ const generateChartApi = async (app, db, yml, api_prefix) => {
249
249
  const list = await db.collection(entity_x).aggregate(a).toArray();
250
250
 
251
251
  r.options.xaxis.categories = list.map(m => m._id);
252
+ if(chart.x.values) {
253
+ r.options.xaxis.categories = r.options.xaxis.categories.map(c => {
254
+ return chart.x.values.find(v => v.name == c)?.label || c;
255
+ });
256
+ }
252
257
  r.series.push({ name: label, data: list.map(m => m.count) });
253
258
  }
254
259